1 # Copyright (C) 2007-2024 CEA, EDF, OPEN CASCADE
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, or (at your option) any later version.
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.
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
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 # File : GEOM_example7.py
22 # Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
29 from salome.geom import geomBuilder
30 geompy = geomBuilder.New()
32 data_dir = os.path.join(os.getenv('GEOM_ROOT_DIR'), 'share', 'salome', 'resources', 'geom', 'textures')
33 texture_1 = geompy.LoadTexture(os.path.join(data_dir, "texture1.dat"))
34 texture_2 = geompy.LoadTexture(os.path.join(data_dir, "texture2.dat"))
35 texture_3 = geompy.LoadTexture(os.path.join(data_dir, "texture3.dat"))
37 Vertex_1 = geompy.MakeVertex(0, 0, 0)
38 Vertex_2 = geompy.MakeVertex(100, 0, 0)
39 Vertex_3 = geompy.MakeVertex(0, 100, 0)
40 Vertex_4 = geompy.MakeVertex(0, 0, 100)
41 Vertex_5 = geompy.MakeVertex(100, 0, 100)
42 Vertex_1.SetMarkerTexture(texture_1);
43 Vertex_2.SetMarkerTexture(texture_2);
44 Vertex_3.SetMarkerTexture(texture_3);
45 Vertex_4.SetMarkerStd(GEOM.MT_O_PLUS, GEOM.MS_25);
46 Vertex_5.SetMarkerStd(GEOM.MT_BALL, GEOM.MS_40);
47 geompy.addToStudy( Vertex_1, "Vertex_1" )
48 geompy.addToStudy( Vertex_2, "Vertex_2" )
49 geompy.addToStudy( Vertex_3, "Vertex_3" )
50 geompy.addToStudy( Vertex_4, "Vertex_4" )
51 geompy.addToStudy( Vertex_5, "Vertex_5" )