Changeset 8054
 Timestamp:
 Oct 29, 2010, 11:00:29 AM (12 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/anuga_core/source/anuga/geometry/test_polygon.py
r8038 r8054 13 13 plot_polygons, outside_polygon, is_outside_polygon, \ 14 14 intersection, is_complex, polygon_overlap, not_polygon_overlap,\ 15 polyline_overlap, not_polyline_overlap,\15 line_intersect, not_line_intersect,\ 16 16 is_inside_triangle, interpolate_polyline, inside_polygon, \ 17 17 in_and_outside_polygon … … 503 503 assert num.allclose([0], indices) 504 504 505 def test_ polyline_overlap(self):505 def test_line_intersect(self): 506 506 #rectangular polygon, 2 triangles overlap 507 polyline = [[3.,3.],[4.,3.]]507 line = [[3.,3.],[4.,3.]] 508 508 triangles = [[7.,10.],#does not overlap 509 509 [8.,12.], … … 525 525 [3., 1.]] 526 526 527 indices = polyline_overlap(triangles, polyline)527 indices = line_intersect(triangles, line) 528 528 assert num.allclose([1, 2, 3, 5], indices) 529 529 530 def test_not_ polyline_overlap(self):530 def test_not_line_intersect(self): 531 531 #rectangular polygon, 2 triangles overlap 532 polyline = [[3.,3.],[4.,3.]]532 line = [[3.,3.],[4.,3.]] 533 533 triangles = [[7.,10.],#does not overlap 534 534 [8.,12.], … … 550 550 [3., 1.]] 551 551 552 indices = not_ polyline_overlap(triangles, polyline)552 indices = not_line_intersect(triangles, line) 553 553 assert num.allclose([4, 0], indices) 554 554
Note: See TracChangeset
for help on using the changeset viewer.