simon-git: polyhedra (master): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Fri Aug 28 19:18:46 BST 2020


TL;DR:
  b2482d6 Remove a rogue import statement.
  552d771 drawnet.py: massive refactoring of the whole program.
  685b70e Switch the whole code base to Python 3.

Repository:     https://git.tartarus.org/simon/polyhedra.git
On the web:     https://git.tartarus.org/?p=simon/polyhedra.git
Branch updated: master
Committer:      Simon Tatham <anakin at pobox.com>
Date:           2020-08-28 19:18:46

commit b2482d6a3696cd2c48778578be13382fdd45b673
web diff https://git.tartarus.org/?p=simon/polyhedra.git;a=commitdiff;h=b2482d6a3696cd2c48778578be13382fdd45b673;hp=a0cb5eb4f01494c2fa8756781baf4195c2c50c2d
Author: Simon Tatham <anakin at pobox.com>
Date:   Fri Aug 28 19:13:35 2020 +0100

    Remove a rogue import statement.
    
    When I moved crosspoint() into polylib.py in commit 7bc1105641c1,
    apparently I didn't _quite_ manage to get rid of all the import
    statements that referred to it under its old module name.

 drawpoly.py | 1 -
 1 file changed, 1 deletion(-)

commit 552d77133b5e4e26b80a339997ef736bd814d761
web diff https://git.tartarus.org/?p=simon/polyhedra.git;a=commitdiff;h=552d77133b5e4e26b80a339997ef736bd814d761;hp=b2482d6a3696cd2c48778578be13382fdd45b673
Author: Simon Tatham <anakin at pobox.com>
Date:   Fri Aug 28 19:16:47 2020 +0100

    drawnet.py: massive refactoring of the whole program.
    
    This program in particular has always been very hard to maintain,
    because it consisted of basically one long sequence of complicated
    operations which filled up a single variable namespace with more and
    more stuff, with no clear idea of which variables were set in order to
    be used later and which were temporary.
    
    In the revised version, there's a NetDrawer class whose class
    variables store all the stuff that persists for the lifetime of the
    computation, and all the temporary variables are now locals of one
    method or another. That by itself should greatly improve clarity and
    ease of modification.
    
    Also, I've revised a lot of the code to make use of the new vector
    routines in polylib, which means there are far fewer variables - every
    time an x,y pair can be replaced by a single tuple, we have one fewer
    name to keep track of.

 drawnet.py | 1957 ++++++++++++++++++++++++++++++------------------------------
 polylib.py |   53 ++
 2 files changed, 1042 insertions(+), 968 deletions(-)

commit 685b70e501cd4e7b4c0fe2b71d6b76d7136e1136
web diff https://git.tartarus.org/?p=simon/polyhedra.git;a=commitdiff;h=685b70e501cd4e7b4c0fe2b71d6b76d7136e1136;hp=552d77133b5e4e26b80a339997ef736bd814d761
Author: Simon Tatham <anakin at pobox.com>
Date:   Fri Aug 28 19:18:26 2020 +0100

    Switch the whole code base to Python 3.
    
    To my surprise, this turned out to be almost totally trivial! I think
    a lot of the recent refactoring must have been in sufficiently
    P3-friendly style that there was basically nothing left to get wrong.
    (That and the fact that I'd already switched to print_function style,
    and also this codebase doesn't do a lot with strings or binary data,
    so the str/bytes revamp didn't cause trouble.)
    
    I did have to make one tiny syntactic fix in drawnet.py, but that was
    it. Other than that, this commit is just updating #! lines and
    removing no-longer-needed 'from __future__' imports.

 canvas.py            | 2 +-
 cleanpoly.py         | 3 +--
 describe.py          | 3 +--
 drawnet.py           | 5 ++---
 drawpoints.py        | 3 +--
 drawpoly.py          | 3 +--
 dual.py              | 3 +--
 flashpoly.py         | 3 +--
 misc/dihedral.py     | 2 +-
 mkpoints.py          | 3 +--
 nfaces.py            | 3 +--
 nvertices.py         | 3 +--
 polylib.py           | 1 -
 povpoly.py           | 3 +--
 regular/mkregular.py | 2 +-
 transform.py         | 3 +--
 untangle.py          | 3 +--
 zonohedron.py        | 3 +--
 18 files changed, 18 insertions(+), 33 deletions(-)



More information about the tartarus-commits mailing list