[349] | 1 | SYSTEM REQUIREMENTS |
---|
| 2 | |
---|
[1279] | 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) |
---|
[349] | 8 | |
---|
| 9 | INSTALLATION COMMANDS, FOR LINUX |
---|
[1279] | 10 | |
---|
| 11 | This is necessary to complite triangle for using pmesh graphically and |
---|
| 12 | the pmesh.mesh script. |
---|
| 13 | |
---|
| 14 | To build triangle, as root; |
---|
[349] | 15 | python setup.py install |
---|
| 16 | |
---|
| 17 | To build the python package, as a user; |
---|
[1277] | 18 | python setup.py install --prefix=~ |
---|
| 19 | |
---|
| 20 | This will create a python directory, off the users home directory. |
---|
| 21 | Add the path of this directory into your .bashrc |
---|
| 22 | for example; |
---|
[349] | 23 | export PYTHONPATH=$HOME/lib/python2.2/site-packages:"${PYTHONPATH}" |
---|
[1277] | 24 | another example; |
---|
| 25 | export PYTHONPATH=$HOME/lib64/python2.3/site-packages:"${PYTHONPATH}" |
---|
[349] | 26 | |
---|
| 27 | INSTALLATION COMMANDS, FOR WINDOWS |
---|
| 28 | To compile using Microsoft Visual c++, |
---|
| 29 | python setup.py install |
---|
| 30 | |
---|
[1470] | 31 | To compile using mingw, |
---|
| 32 | python setup.py build -cmingw32 |
---|
| 33 | python setup.py install |
---|
[1476] | 34 | |
---|
| 35 | Note for this to work mingw has to be installed. Plus move |
---|
| 36 | the file libpython23.a into the python\libs directory. If |
---|
| 37 | 'install' does not work move the triang.pyd file manually. |
---|
| 38 | |
---|
[349] | 39 | GENERAL RUNNING |
---|
| 40 | To run all tests Harnesses; |
---|
| 41 | python TestRunner.py |
---|
| 42 | |
---|
| 43 | To run pmesh; |
---|
| 44 | python pmesh.py |
---|
| 45 | |
---|
| 46 | INSTRUCTIONS FOR USING PMESH |
---|
| 47 | |
---|
| 48 | Pmesh will let the user select various modes. The current |
---|
| 49 | allowable modes are vertex or segment. The mode describes what sort |
---|
| 50 | of object is added or selected in response to mouse clicks. When |
---|
| 51 | changing modes any prior selected objects become deselected. |
---|
| 52 | |
---|
| 53 | In general the left mouse button will add an object and the right |
---|
| 54 | mouse button will select an object. A selected object can de deleted |
---|
| 55 | by pressing the the middle mouse button (scroll bar). |
---|
| 56 | |
---|
| 57 | NOTES |
---|
| 58 | I have examples of running triangle in |
---|
| 59 | nautilus /home/duncan/MeshGen/triangle_old |
---|
| 60 | |
---|
| 61 | CREATING A PMESH EXECUTABLE |
---|
| 62 | |
---|
| 63 | There is a package called py2exe which can take a Python script and |
---|
| 64 | package it up along with any other scripts it imports and a Python |
---|
| 65 | interpreter into a single .exe. It will also find any DLLs your script |
---|
| 66 | depends on and copy them too. |
---|
| 67 | |
---|
| 68 | The packaging process: |
---|
| 69 | |
---|
| 70 | |
---|
| 71 | 1)Install py2exe. This only needs to be done once on a machine. |
---|
| 72 | |
---|
| 73 | 2)Make a static version of Pmw. Pmesh uses a package called Pmw which |
---|
| 74 | normally dynamically loads pieces of itself as needed. This doesn't |
---|
| 75 | work with py2exe, so we need to fix it. You'll only need to do this |
---|
| 76 | once; if you make a change to your script and |
---|
| 77 | repackage you can skip this step. |
---|
| 78 | |
---|
| 79 | cd to c:\python22\lib\site-packages\Pmw\Pmw_1_1\bin. (Assuming python |
---|
| 80 | is installed in the default c:\python22; change the paths if you |
---|
| 81 | installed Python somewhere else. |
---|
| 82 | |
---|
| 83 | run "python bundlepmw.py |
---|
| 84 | c:\python22\lib\site-packages\Pmw\Pmw_1_1\lib". This will create a |
---|
| 85 | file called "Pmw.py" in the current directory. |
---|
| 86 | |
---|
| 87 | copy "Pmw.py" to your main script directory. |
---|
| 88 | |
---|
| 89 | copy "..\lib\PmwBlt.py" and "..\lib\PmwColor.py" to your main script |
---|
| 90 | directory, too. |
---|
| 91 | |
---|
| 92 | 3) Do the command "python exesetup.py py2exe" This will create a dist directory with the pmesh executable. |
---|