Changeset 8053
- Timestamp:
- Oct 29, 2010, 11:00:13 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/geometry/polygon.py
r8037 r8053 257 257 return indices[count:] 258 258 259 def polyline_overlap(triangles, polyline, verbose=False):259 def line_intersect(triangles, line, verbose=False): 260 260 """Determine if a polygon and triangle overlap 261 261 262 262 """ 263 polyline = ensure_numeric(polyline)263 line = ensure_numeric(line) 264 264 triangles = ensure_numeric(triangles) 265 265 … … 268 268 indices = num.zeros(M, num.int) 269 269 270 count = _ polyline_overlap(polyline, triangles, indices)270 count = _line_intersect(line, triangles, indices) 271 271 272 272 if verbose: 273 log.critical('Found %d triangles (out of %d) that polygon' % (count, M))273 log.critical('Found %d triangles (out of %d) that overlap the polygon' % (count, M)) 274 274 275 275 return indices[:count] 276 276 277 def not_ polyline_overlap(triangles, polyline, verbose=False):277 def not_line_intersect(triangles, line, verbose=False): 278 278 """Determine if a polyline and triangle overlap 279 279 280 280 """ 281 polyline = ensure_numeric(polyline)281 line = ensure_numeric(line) 282 282 triangles = ensure_numeric(triangles) 283 283 … … 286 286 indices = num.zeros(M, num.int) 287 287 288 count = _ polyline_overlap(polyline, triangles, indices)288 count = _line_intersect(line, triangles, indices) 289 289 290 290 if verbose: 291 log.critical('Found %d triangles (out of %d) that polygon' % (count, M))291 log.critical('Found %d triangles (out of %d) that intersect the line' % (count, M)) 292 292 293 293 return indices[count:] … … 1172 1172 from polygon_ext import _interpolate_polyline 1173 1173 from polygon_ext import _polygon_overlap 1174 from polygon_ext import _ polyline_overlap1174 from polygon_ext import _line_intersect 1175 1175 from polygon_ext import _is_inside_triangle 1176 1176 #from polygon_ext import _intersection
Note: See TracChangeset
for help on using the changeset viewer.