# Changeset 8031

Ignore:
Timestamp:
Oct 10, 2010, 5:13:51 PM (13 years ago)
Message:

File:
1 edited

Unmodified
Removed
• ## trunk/anuga_core/source/anuga/geometry/polygon.py

 r8009 return status, value def polygon_overlap(triangles, polygon, verbose=False): """Determine if a polygon and triangle overlap """ polygon = ensure_numeric(polygon) triangles = ensure_numeric(triangles) M = triangles.shape[0]/3  # Number of triangles indices = num.zeros(M, num.int) count = _polygon_overlap(polygon, triangles, indices) if verbose: log.critical('Found %d triangles (out of %d) that polygon' % (count, M)) return indices[:count] def not_polygon_overlap(triangles, polygon, verbose=False): """Determine if a polygon and triangle overlap """ polygon = ensure_numeric(polygon) triangles = ensure_numeric(triangles) M = triangles.shape[0]/3  # Number of triangles indices = num.zeros(M, num.int) count = _polygon_overlap(polygon, triangles, indices) if verbose: log.critical('Found %d triangles (out of %d) that polygon' % (count, M)) return indices[count:] def is_inside_triangle(point, triangle, closed=True, from polygon_ext import _separate_points_by_polygon from polygon_ext import _interpolate_polyline from polygon_ext import _polygon_overlap from polygon_ext import _is_inside_triangle #from polygon_ext import _intersection
Note: See TracChangeset for help on using the changeset viewer.