Ignore:
Timestamp:
Jun 2, 2006, 1:12:20 PM (19 years ago)
Author:
ole
Message:

Changed semantics of inside_polygon (and outside_polygon) so that one point is treated as a list containing that one point. For the old boolean functionality use is_inside_polygon and is_outside_polygon.
Fixed unit tests as well

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/pyvolution/test_mesh.py

    r3012 r3052  
    1515from Numeric import allclose, array
    1616
    17 from utilities.polygon import inside_polygon
     17from utilities.polygon import is_inside_polygon
    1818
    1919def distance(x, y):
     
    725725        for p in points:
    726726            #print p, P
    727             assert inside_polygon(p, P)
     727            assert is_inside_polygon(p, P)
    728728
    729729
     
    762762        for p in points:
    763763            #print p, P
    764             assert inside_polygon(p, P)
     764            assert is_inside_polygon(p, P)
    765765
    766766
     
    802802
    803803        for p in points:
    804             assert inside_polygon(p, P)
     804            assert is_inside_polygon(p, P)
    805805
    806806
     
    828828        assert len(P) == 16
    829829        for p in points:
    830             assert inside_polygon(p, P)
     830            assert is_inside_polygon(p, P)
    831831
    832832
     
    843843
    844844        for p in points:
    845             assert inside_polygon(p, P)
     845            assert is_inside_polygon(p, P)
    846846
    847847        #print mesh.statistics()   
     
    909909        for p in points:
    910910            #print p, P
    911             assert inside_polygon(p, P)
     911            assert is_inside_polygon(p, P)
    912912
    913913
Note: See TracChangeset for help on using the changeset viewer.