Changeset 3492


Ignore:
Timestamp:
Aug 15, 2006, 4:20:46 PM (18 years ago)
Author:
duncan
Message:

Cleaning things up

Location:
inundation/pmesh
Files:
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • inundation/pmesh/AppShell.py

    r349 r3492  
    77created by Doug Hellmann (doughellmann@mindspring.com).
    88
     9Pmw copyright
     10
     11Copyright 1997-1999 Telstra Corporation Limited,
     12Australia Copyright 2000-2002 Really Good Software Pty Ltd, Australia
     13
     14Permission is hereby granted, free of charge, to any person obtaining
     15a copy of this software and associated documentation files (the
     16"Software"), to deal in the Software without restriction, including
     17without limitation the rights to use, copy, modify, merge, publish,
     18distribute, sublicense, and/or sell copies of the Software, and to
     19permit persons to whom the Software is furnished to do so, subject to
     20the following conditions:
     21
     22The above copyright notice and this permission notice shall be
     23included in all copies or substantial portions of the Software.
     24
     25THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
     26EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
     27MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
     28NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
     29LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
     30OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
     31WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
     32
    933"""
     34
    1035
    1136from Tkinter import *
  • inundation/pmesh/README

    r1926 r3492  
    11SYSTEM REQUIREMENTS
     2 Pmesh requires many bits adn peices from the rest of the ANUGA code.
    23 
    3 Python, with Pmw must be installed to use pmesh.  Read the
    4 starting.html file that comes with pmw with regrads to how it is
    5 installed.(quick install advice: install pmw in the
    6 python2.2/site-packages dir) (Python and pmw are in the downloads
    7 directory)
     4 It's system requirements are the same as ANUGA
    85
    9 The inundation directory utilities is also needed to run pmesh.
     6INSTALLATION COMMANDS
     7To compile, do
     8        scones
    109
    11 INSTALLATION COMMANDS, FOR LINUX
    12 
    13 This is necessary to complite triangle for using pmesh graphically and
    14 the pmesh.mesh script.
    15        
    16 To build triangle, as root;
    17         python setup.py install
    18        
    19 To build the python package, as a user;
    20         python setup.py install --prefix=~
    21        
    22         This will create a python directory, off the users home directory.
    23         Add the path of this directory into your .bashrc
    24         for example;   
    25         export PYTHONPATH=$HOME/lib/python2.2/site-packages:"${PYTHONPATH}"
    26         another example;
    27         export PYTHONPATH=$HOME/lib64/python2.3/site-packages:"${PYTHONPATH}"
    28 
    29 INSTALLATION COMMANDS, FOR WINDOWS
    30 To compile using Microsoft Visual c++,
    31         python setup.py install
    32 
    33 To compile using mingw,
    34         python setup.py build -cmingw32
    35         python setup.py install
    36 
    37         Note for this to work mingw has to be installed.  Plus move
    38         the file libpython23.a into the python\libs directory.  If
    39         'install' does not work move the triang.pyd file manually.
    4010               
    4111GENERAL RUNNING
    42 To run all tests Harnesses;
    43         python TestRunner.py
     12To run all the unit tests;
     13        python test_all.py
    4414       
    4515To run pmesh;
    46         python pmesh.py
     16        python graphical_mesh_generator.py
    4717       
    4818INSTRUCTIONS FOR USING PMESH
     
    6232
    6333CREATING A PMESH EXECUTABLE
     34Note, this has not been tried for about 2 years.
    6435
    6536There is a package called py2exe which can take a Python script and
  • inundation/pmesh/graphical_mesh_generator.py

    r3437 r3492  
    206206                ('default', self.windowDefault, 'set default value for selected mode'),
    207207                ('joinVer', self.joinVerticesButton, 'add Segments to connect all vertices'),     
    208              #   ('autoSegHull', self.auto_segmentHullButton, 'add Segments to form alpha shape, using Hull'), 
    209208             #   ('autoSeg', self.auto_segmentButton, 'add Segments to form alpha shape'),
    210209                ('autoSegGiveAlpha', self.auto_segmentGiveAlphaButton, 'add Segments to form alpha shape, specify alpha'),
  • inundation/pmesh/mesh.py

    r3437 r3492  
    15281528        fd.close()
    15291529
    1530     def auto_segmentHull(self):
    1531         """
    1532         initially work by running an executable
    1533         Later compile the c code with a python wrapper.
    1534 
    1535         Precon: There must be 3 or more vertices in the userVertices structure
    1536         """
    1537         newsegs = []
    1538         inputfile = 'hull_in.txt'
    1539         outputfile = inputfile + '-alf'
    1540         #write vertices to file
    1541         fd = open(inputfile,'w')
    1542         for v in self.userVertices:
    1543             fd.write(str(v.x))
    1544             fd.write(' ')
    1545             fd.write(str(v.y))
    1546             fd.write('\n')
    1547         fd.close()
    1548        
    1549         #run hull executable
    1550         #warning need to compile hull for the current operating system
    1551         command = 'hull.exe -A -i ' + inputfile
    1552         os.system(command)
    1553        
    1554         #read results into this object
    1555         fd = open(outputfile)
    1556         lines = fd.readlines()
    1557         fd.close()
    1558         #print "(*(*(*("
    1559         #print lines
    1560         #print "(*(*(*("
    1561         lines.pop(0) #remove the first (title) line
    1562         for line in lines:
    1563             vertindexs = line.split()
    1564             #print 'int(vertindexs[0])', int(vertindexs[0])
    1565             #print 'int(vertindexs[1])', int(vertindexs[1])
    1566             #print 'self.userVertices[int(vertindexs[0])]' ,self.userVertices[int(vertindexs[0])]
    1567             #print 'self.userVertices[int(vertindexs[1])]' ,self.userVertices[int(vertindexs[1])]
    1568             v1 = self.userVertices[int(vertindexs[0])]
    1569             v2 = self.userVertices[int(vertindexs[1])]
    1570            
    1571             if self.isUserSegmentNew(v1,v2):
    1572                 newseg = Segment(v1, v2)
    1573                 newsegs.append(newseg)
    1574             #DSG!!!
    1575         self.userSegments.extend(newsegs)
    1576         return newsegs
    15771530    def auto_segmentFilter(self,raw_boundary=True,
    15781531                    remove_holes=False,
Note: See TracChangeset for help on using the changeset viewer.