Salome HOME
f0f784c71bf89e50dd6322832a5417f3ddaa2e1b
[modules/geom.git] / src / GEOM_SWIG / GEOM_example7.py
1 #  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
2 #
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.
7 #
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.
12 #
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
16 #
17 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 #
19
20 # ---
21 #  File   : GEOM_example7.py
22 #  Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
23 # ---
24 #
25 import salome
26 import geompy
27 import os
28 import GEOM
29
30 data_dir = os.getenv('DATA_DIR')
31 if data_dir:
32     texture_1 = geompy.LoadTexture(os.path.join(data_dir, "Textures", "texture1.dat"))
33     texture_2 = geompy.LoadTexture(os.path.join(data_dir, "Textures", "texture2.dat"))
34     texture_3 = geompy.LoadTexture(os.path.join(data_dir, "Textures", "texture3.dat"))
35     
36     Vertex_1 = geompy.MakeVertex(0, 0, 0)
37     Vertex_2 = geompy.MakeVertex(100, 0, 0)
38     Vertex_3 = geompy.MakeVertex(0, 100, 0)
39     Vertex_4 = geompy.MakeVertex(0, 0, 100)
40     Vertex_5 = geompy.MakeVertex(100, 0, 100)
41     Vertex_1.SetMarkerTexture(texture_1);
42     Vertex_2.SetMarkerTexture(texture_2);
43     Vertex_3.SetMarkerTexture(texture_3);
44     Vertex_4.SetMarkerStd(GEOM.MT_O_PLUS, GEOM.MS_25);
45     Vertex_5.SetMarkerStd(GEOM.MT_BALL,   GEOM.MS_40);
46     geompy.addToStudy( Vertex_1, "Vertex_1" )
47     geompy.addToStudy( Vertex_2, "Vertex_2" )
48     geompy.addToStudy( Vertex_3, "Vertex_3" )
49     geompy.addToStudy( Vertex_4, "Vertex_4" )
50     geompy.addToStudy( Vertex_5, "Vertex_5" )
51     pass