Example #1
0
 def findOrientation(self, tv, ve):
     mateVE = tv.get_mate(ve)
     if ve.qi != 0 or mateVE.qi != 0:
         ait = AdjacencyIterator(tv, 1, 0)
         winner = None
         incoming = True
         while not ait.is_end:
             ave = ait.object
             if ave.id != ve.id and ave.id != mateVE.id:
                 winner = ait.object
                 if not ait.isIncoming():  # FIXME
                     incoming = False
                     break
             ait.increment()
         if winner is not None:
             if not incoming:
                 direction = self._Get2dDirection(winner.last_fedge)
             else:
                 direction = self._Get2dDirection(winner.first_fedge)
             return direction
     return None
Example #2
0
	def findOrientation(self, tv, ve):
		mateVE = tv.get_mate(ve)
		if ve.qi != 0 or mateVE.qi != 0:
			ait = AdjacencyIterator(tv,1,0)
			winner = None
			incoming = True
			while not ait.is_end:
				ave = ait.object
				if  ave.id != ve.id and ave.id != mateVE.id:
					winner = ait.object
					if not ait.isIncoming(): # FIXME
						incoming = False
						break
				ait.increment()
			if winner is not None:
				if not incoming:
					direction = self._Get2dDirection(winner.last_fedge)
				else:
					direction = self._Get2dDirection(winner.first_fedge)
				return direction
		return None