Changeset 410 for inundation/ga/storm_surge/pmesh/pmesh.py
- Timestamp:
- Oct 15, 2004, 3:58:45 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/ga/storm_surge/pmesh/pmesh.py
r409 r410 602 602 [tag,string] = self.canvas.gettags(CURRENT) # get a list of them 603 603 print "tag",tag #tags ('M*1008', 'current') 604 if tag[:2] == 'M*': #!!! this can be removed when there are 605 #key, value = string.split(tag, '*') 606 objectID = tag 607 print "Found!! objectID:", objectID 608 if self.Vertices.hasKey(objectID): #isinstance(self.meshObjects[objectID],mesh.Vertex): 609 vertex = self.Vertices.getMeshObject(objectID) 610 found = True 611 print "Found! vertex", vertex 612 613 if found and self.selVertex == vertex: 614 print "The selected vertex has already been selected" 615 #The selected vertex has already been selected 616 # therefore deselect it 617 self.deselectVertex(self.selVertex, self.selVertexTag) 618 found = False 604 objectID = tag 605 #print "Found!! objectID:", objectID 606 if self.Vertices.hasKey(objectID): #isinstance(self.meshObjects[objectID],mesh.Vertex): 607 vertex = self.Vertices.getMeshObject(objectID) 608 found = True 609 print "Found! vertex", vertex 610 611 if found and self.selVertex == vertex: 612 print "The selected vertex has already been selected" 613 #The selected vertex has already been selected 614 # therefore deselect it 615 self.deselectVertex(self.selVertex, self.selVertexTag) 616 found = False 619 617 620 if found: 621 #A vertex has been selected! 622 if self.selVertex: 623 if self.mesh.isUserSegmentNew(self.selVertex,vertex): 624 #vertex is the 2nd vertex 625 self.drawSegment(vertex,self.selVertex) 626 self.deselectVertex(self.selVertex, self.selVertexTag) 627 self.selectVertex(vertex,objectID) 628 else: 629 print "vertex is the 1st vertex" 630 #vertex is the 1st vertex 618 if found: 619 #A vertex has been selected! 620 if self.selVertex: 621 if self.mesh.isUserSegmentNew(self.selVertex,vertex): 622 #vertex is the 2nd vertex 623 self.drawSegment(vertex,self.selVertex) 624 self.deselectVertex(self.selVertex, self.selVertexTag) 631 625 self.selectVertex(vertex,objectID) 626 else: 627 print "vertex is the 1st vertex" 628 #vertex is the 1st vertex 629 self.selectVertex(vertex,objectID) 632 630 else: 633 631 print " There are no widgets. This happen's too much" … … 1010 1008 mesh.Segment.set_default_tag("") 1011 1009 self.UserMeshChanged = False 1012 # True when the user mesh is different from the generated mesh.1013 #ie if a1014 # marker is added (seg or region) - D1015 # new vert added - D1016 # seg is added - D1017 # hole is added - D1018 # the maximum triangle area for a region is added/modified -D1019 # False after a mesh is generated, initially - D1020 1021 1022 1010 1023 1011 def ipostscript(self):
Note: See TracChangeset
for help on using the changeset viewer.