Back to index

salome-geom  6.5.0
GEOM_example7.py
Go to the documentation of this file.
00001 # Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 #
00003 # This library is free software; you can redistribute it and/or
00004 # modify it under the terms of the GNU Lesser General Public
00005 # License as published by the Free Software Foundation; either
00006 # version 2.1 of the License.
00007 #
00008 # This library is distributed in the hope that it will be useful,
00009 # but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 # Lesser General Public License for more details.
00012 #
00013 # You should have received a copy of the GNU Lesser General Public
00014 # License along with this library; if not, write to the Free Software
00015 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00016 #
00017 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00018 #
00019 
00020 # ---
00021 #  File   : GEOM_example7.py
00022 #  Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
00023 # ---
00024 #
00025 import salome
00026 import geompy
00027 import os
00028 import GEOM
00029 
00030 data_dir = os.getenv('DATA_DIR')
00031 if data_dir:
00032     texture_1 = geompy.LoadTexture(os.path.join(data_dir, "Textures", "texture1.dat"))
00033     texture_2 = geompy.LoadTexture(os.path.join(data_dir, "Textures", "texture2.dat"))
00034     texture_3 = geompy.LoadTexture(os.path.join(data_dir, "Textures", "texture3.dat"))
00035     
00036     Vertex_1 = geompy.MakeVertex(0, 0, 0)
00037     Vertex_2 = geompy.MakeVertex(100, 0, 0)
00038     Vertex_3 = geompy.MakeVertex(0, 100, 0)
00039     Vertex_4 = geompy.MakeVertex(0, 0, 100)
00040     Vertex_5 = geompy.MakeVertex(100, 0, 100)
00041     Vertex_1.SetMarkerTexture(texture_1);
00042     Vertex_2.SetMarkerTexture(texture_2);
00043     Vertex_3.SetMarkerTexture(texture_3);
00044     Vertex_4.SetMarkerStd(GEOM.MT_O_PLUS, GEOM.MS_25);
00045     Vertex_5.SetMarkerStd(GEOM.MT_BALL,   GEOM.MS_40);
00046     geompy.addToStudy( Vertex_1, "Vertex_1" )
00047     geompy.addToStudy( Vertex_2, "Vertex_2" )
00048     geompy.addToStudy( Vertex_3, "Vertex_3" )
00049     geompy.addToStudy( Vertex_4, "Vertex_4" )
00050     geompy.addToStudy( Vertex_5, "Vertex_5" )
00051     pass