Back to index

salome-geom  6.5.0
PAL_MESH_033_geometry.py
Go to the documentation of this file.
00001 #  -*- coding: iso-8859-1 -*-
00002 # Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00003 #
00004 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00005 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00006 #
00007 # This library is free software; you can redistribute it and/or
00008 # modify it under the terms of the GNU Lesser General Public
00009 # License as published by the Free Software Foundation; either
00010 # version 2.1 of the License.
00011 #
00012 # This library is distributed in the hope that it will be useful,
00013 # but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015 # Lesser General Public License for more details.
00016 #
00017 # You should have received a copy of the GNU Lesser General Public
00018 # License along with this library; if not, write to the Free Software
00019 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00020 #
00021 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00022 #
00023 
00024 #####################################################################
00025 #Created                :17/02/2005
00026 #Auhtor                 :KOVALTCHUK Alexey 
00027 #GUI test scenario      :PAL-MESH-033 (geometry part)
00028 #####################################################################
00029 #
00030 import geompy
00031 import salome
00032 
00033 #Points creation (2.2)
00034 Vertex_1 = geompy.MakeVertex(0, 0, 0)
00035 geompy.addToStudy(Vertex_1, "Vertex_1")
00036 
00037 Vertex_2 = geompy.MakeVertex(0, 100, 0)
00038 geompy.addToStudy(Vertex_2, "Vertex_2")
00039 
00040 Vertex_3 = geompy.MakeVertex(100, 100, 0)
00041 geompy.addToStudy(Vertex_3, "Vertex_3")
00042 
00043 Vertex_4 = geompy.MakeVertex(100, 0, 0)
00044 geompy.addToStudy(Vertex_4, "Vertex_4")
00045 
00046 #Edges creation (2.18)
00047 Edge_1 = geompy.MakeEdge(Vertex_1, Vertex_2)
00048 geompy.addToStudy(Edge_1, "Edge_1")
00049 
00050 Edge_2 = geompy.MakeEdge(Vertex_2, Vertex_3)
00051 geompy.addToStudy(Edge_2, "Edge_2")
00052 
00053 Edge_3 = geompy.MakeEdge(Vertex_3, Vertex_4)
00054 geompy.addToStudy(Edge_3, "Edge_3")
00055 
00056 Edge_4 = geompy.MakeEdge(Vertex_4, Vertex_1)
00057 geompy.addToStudy(Edge_4, "Edge_4")
00058 
00059 #Wire creation (2.33)
00060 Wire_1 = geompy.MakeWire([Edge_1, Edge_2, Edge_3, Edge_4])
00061 geompy.addToStudy(Wire_1, "Wire_1")
00062 
00063 salome.sg.updateObjBrowser(1)