Salome HOME
6cce391ef6780f0292ca2310d580dc08854d8f42
[modules/geom.git] / src / GEOM_SWIG / GEOM_example7.py
1 #  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 #  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
3 #
4 #  This library is free software; you can redistribute it and/or
5 #  modify it under the terms of the GNU Lesser General Public
6 #  License as published by the Free Software Foundation; either
7 #  version 2.1 of the License.
8 #
9 #  This library is distributed in the hope that it will be useful,
10 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
11 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 #  Lesser General Public License for more details.
13 #
14 #  You should have received a copy of the GNU Lesser General Public
15 #  License along with this library; if not, write to the Free Software
16 #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 #
18 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #
20 # ---
21 #
22 #  File   : GEOM_example7.py
23 #  Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
24 #
25 # ---
26
27 import salome
28 import geompy
29 import os
30 import GEOM
31
32 data_dir = os.getenv('DATA_DIR')
33 if data_dir:
34     texture_1 = geompy.LoadTexture(os.path.join(data_dir, "Textures", "texture1.dat"))
35     texture_2 = geompy.LoadTexture(os.path.join(data_dir, "Textures", "texture2.dat"))
36     texture_3 = geompy.LoadTexture(os.path.join(data_dir, "Textures", "texture3.dat"))
37     
38     Vertex_1 = geompy.MakeVertex(0, 0, 0)
39     Vertex_2 = geompy.MakeVertex(100, 0, 0)
40     Vertex_3 = geompy.MakeVertex(0, 100, 0)
41     Vertex_4 = geompy.MakeVertex(0, 0, 100)
42     Vertex_5 = geompy.MakeVertex(100, 0, 100)
43     Vertex_1.SetMarkerTexture(texture_1);
44     Vertex_2.SetMarkerTexture(texture_2);
45     Vertex_3.SetMarkerTexture(texture_3);
46     Vertex_4.SetMarkerStd(GEOM.MT_O_PLUS, GEOM.MS_25);
47     Vertex_5.SetMarkerStd(GEOM.MT_BALL,   GEOM.MS_40);
48     geompy.addToStudy( Vertex_1, "Vertex_1" )
49     geompy.addToStudy( Vertex_2, "Vertex_2" )
50     geompy.addToStudy( Vertex_3, "Vertex_3" )
51     geompy.addToStudy( Vertex_4, "Vertex_4" )
52     geompy.addToStudy( Vertex_5, "Vertex_5" )
53     pass