Changeset 5284
- Timestamp:
- May 6, 2008, 4:40:00 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/utilities/polygon.py
r5282 r5284 66 66 status == 2: Coinciding line segment found. Value taks the form [[x0,y0], [x1,y1]] 67 67 status == 3: Lines would coincide but only if extended. Value set to None 68 status == 4: Lines are parallel with a fixed distance apart. Value set to that distance.68 status == 4: Lines are parallel with a fixed distance apart. Value set to None. 69 69 70 70 """ … … 150 150 else: 151 151 # Lines are parallel but they don't coincide 152 return 4, None 152 return 4, None #FIXME (Ole): Add distance here instead of None 153 153 154 154 else: … … 160 160 y = y0 + u0*(y1-y0) 161 161 162 # Sanity check - can be removed to speed up if needed 162 163 assert allclose(x, x2 + u1*(x3-x2)) 163 164 assert allclose(y, y2 + u1*(y3-y2)) … … 167 168 # We have intersection 168 169 169 return 1, [x, y]170 return 1, array([x, y]) 170 171 else: 171 172 # No intersection
Note: See TracChangeset
for help on using the changeset viewer.