Version: 9.16.0
libGEOM_Swig.h
Go to the documentation of this file.
1// Copyright (C) 2007-2026 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
35{
36public:
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();
59 GEOMGUI_EXPORT void setLocalSelection(const std::vector<int> ids);
61
62 GEOMGUI_EXPORT int getIndexTopology( const char* theSubIOR, const char* theMainIOR );
63 GEOMGUI_EXPORT const char* getShapeTypeString( const char* theIOR );
64 GEOMGUI_EXPORT const char* getShapeTypeIcon( const char* theIOR );
65
67
70
71private:
72 void init( bool updateOB );
73};
74
75#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:297
GEOMGUI_EXPORT void createAndDisplayFitAllGO(const char *theEntry)
Same as createAndDisplayGO, but also fits the active view to the contents.
Definition: libGEOM_Swig.cxx:163
GEOMGUI_EXPORT void UpdateViewer()
Update active viewer contents.
Definition: libGEOM_Swig.cxx:218
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:432
GEOMGUI_EXPORT void setNameMode(const char *theEntry, bool theOn, bool theUpdateViewer=true)
Show / hide name of shape for the presentation.
Definition: libGEOM_Swig.cxx:418
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:458
GEOMGUI_EXPORT bool initGeomGen()
Initialize GEOM module's engine.
Definition: libGEOM_Swig.cxx:672
GEOMGUI_EXPORT void createAndDisplayGO(const char *theEntry, bool theUpdateViewer=true)
Display the presenation in the currently active view.
Definition: libGEOM_Swig.cxx:137
GEOMGUI_EXPORT GEOM_Swig(bool updateOB=true)
Constructor.
Definition: libGEOM_Swig.cxx:60
GEOMGUI_EXPORT const char * getShapeTypeString(const char *theIOR)
Get shape type name.
Definition: libGEOM_Swig.cxx:270
GEOMGUI_EXPORT std::vector< int > getLocalSelection()
get local subShapes selection on a given shape
Definition: libGEOM_Swig.cxx:582
GEOMGUI_EXPORT void setVectorsMode(const char *theEntry, bool theOn, bool theUpdateViewer=true)
Show / hide edges direction vectors for the presentation.
Definition: libGEOM_Swig.cxx:394
GEOMGUI_EXPORT void setTransparency(const char *theEntry, float theTransparency, bool theUpdateViewer=true)
Set transparency of the presentation.
Definition: libGEOM_Swig.cxx:471
GEOMGUI_EXPORT void setMaterial(const char *theEntry, const char *theMaterial, bool theUpdateViewer=true)
Set material to the presentation.
Definition: libGEOM_Swig.cxx:495
GEOMGUI_EXPORT void initLocalSelection(const char *theEntry, int theMode)
initialize local subShapes selection on a given shape
Definition: libGEOM_Swig.cxx:520
GEOMGUI_EXPORT void closeLocalSelection()
close local subShapes selection on a given shape
Definition: libGEOM_Swig.cxx:634
GEOMGUI_EXPORT void setMaterialProperty(const char *theEntry, const char *theMaterial, bool theUpdateViewer=true)
Set material property to the presentation.
Definition: libGEOM_Swig.cxx:509
GEOMGUI_EXPORT ~GEOM_Swig()
Destructor.
Definition: libGEOM_Swig.cxx:68
GEOMGUI_EXPORT void eraseGO(const char *theEntry, bool theUpdateViewer=true)
Erase presentation in the currently active viewer.
Definition: libGEOM_Swig.cxx:194
static GEOMGUI_OCCSelector * myOCCSelector
Definition: libGEOM_Swig.h:69
void init(bool updateOB)
Internal initialization.
Definition: libGEOM_Swig.cxx:83
GEOMGUI_EXPORT void setDisplayMode(const char *theEntry, int theMode, bool theUpdateViewer=true)
Set display mode to the presentation.
Definition: libGEOM_Swig.cxx:382
GEOMGUI_EXPORT void setVerticesMode(const char *theEntry, bool theOn, bool theUpdateViewer=true)
Show / hide vertices for the presentation.
Definition: libGEOM_Swig.cxx:406
GEOMGUI_EXPORT int getIndexTopology(const char *theSubIOR, const char *theMainIOR)
Get sub-shape index inside main shape.
Definition: libGEOM_Swig.cxx:240
static GEOM_Swig_LocalSelector * myLocalSelector
Definition: libGEOM_Swig.h:68
GEOMGUI_EXPORT void setLocalSelection(const std::vector< int > ids)
Set local subShapes selection on a given shape.
Definition: libGEOM_Swig.cxx:609
GEOMGUI_EXPORT void setDeflection(const char *theEntry, float theDeflection, bool theUpdateViewer=true)
Set deflection coefficient of the presentation.
Definition: libGEOM_Swig.cxx:483