2 # -*- coding: utf-8 -*-
3 # Copyright (C) 2007-2016 CEA/DEN, EDF R&D
5 # This library is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU Lesser General Public
7 # License as published by the Free Software Foundation; either
8 # version 2.1 of the License, or (at your option) any later version.
10 # This library is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # Lesser General Public License for more details.
15 # You should have received a copy of the GNU Lesser General Public
16 # License along with this library; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 these file is using in GHS3DPRL Plugin
24 to convert input files .faces and .points of Tepal V1
25 to input file .mesh of Tepal V2
26 assume compatibility GHS3DPRL Plugin Tepal V1 => Tepal V2
27 example of use (when Tepal V2):
28 facespoints2mesh.py GHS3DPRL
29 tepal2med --casename=GHS3DPRL --number=12 --medname=DOMAIN --launchtepal=no
30 mesh2facespoints.py DOMAIN
46 ft.write('MeshVersionFormatted 1\n')
47 ft.write('\nDimension\n3\n')
50 ft.write('\nVertices\n')
52 for i in xrange(0,nb):
59 nb=int(lig.split()[0])
60 ft.write('\nTriangles\n'+lig.split()[0]+'\n')
61 for i in xrange(0,nb):
64 ft.write(lig[1]+' '+lig[2]+' '+lig[3]+' '+lig[4]+'\n')
67 print 'facespoints2mesh creation of file '+f3