Changeset 684 for inundation/ga/storm_surge/alpha_shape
- Timestamp:
- Dec 7, 2004, 4:06:17 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/ga/storm_surge/alpha_shape/alpha_shape.py
r674 r684 90 90 pointattlist = [ [] for i in range(len(points)) ] 91 91 mode = "Qzcn" 92 #print "compute delaunay triangulation"92 print "computing delaunay triangulation ... \n" 93 93 tridata = triang.genMesh(points,seglist,holelist,regionlist,pointattlist,segattlist,trilist,mode) 94 94 #print tridata … … 99 99 self.hulledges = tridata['generatedsegmentlist'] 100 100 101 #print "deltri: ", self.deltri, "\n"101 print "Number of delaunay triangles: ", len(self.deltri), "\n" 102 102 #print "deltrinbrs: ", self.deltrinbr, "\n" 103 103 104 104 # Build Alpha table 105 print "Building alpha table ... \n" 105 106 self._tri_circumradius() 107 print "Largest circumradius ", max(self.triradius) 106 108 self._edge_intervals() 107 109 self._vertex_intervals() … … 112 114 # every vertex is non-singular so... 113 115 self.optimum_alpha = max([ interval[0] for interval in self.vertexinterval]) 114 #print "optimum alpha ", self.optimum_alpha116 print "optimum alpha ", self.optimum_alpha 115 117 116 118 #alpha_tri = self.get_alpha_triangles(self.optimum_alpha) … … 247 249 for i in range(nv): 248 250 radii = [ self.triradius[t] for t in vertexnbrs[i] if t>=0 ] 249 vertexinterval[i] = [min(radii), max(radii)] 250 if vertexnbrs[i][-1]==-1: 251 vertexinterval[i][1]=INF 251 try: 252 vertexinterval[i] = [min(radii), max(radii)] 253 if vertexnbrs[i][-1]==-1: 254 vertexinterval[i][1]=INF 255 except ValueError: 256 print "Vertex %i is isolated?"%i 257 print "coords: ",self.points[i] 258 print "Vertex nbrs: ", vertexnbrs[i] 259 print "nbr radii: ",radii 260 vertexinterval[i] = [0,INF] 261 pass 252 262 253 263 self.vertexnbr = vertexnbrs … … 303 313 alpha = None 304 314 315 print "about to call alpha shape routine \n" 305 316 alpha_shape_via_files(point_file, boundary_file, alpha) 306 317
Note: See TracChangeset
for help on using the changeset viewer.