コード例 #1
0
ファイル: pick.py プロジェクト: Matt-Esch/anaconda
 def check(self):
     x1 = self.evaluate_expression(self.get_parameter(0))
     y1 = self.evaluate_expression(self.get_parameter(1))
     x2 = self.evaluate_expression(self.get_parameter(2))
     y2 = self.evaluate_expression(self.get_parameter(3))
     instances = [instance for instance in self.get_frame_instances()
         if collide_line(instance.x1, instance.y1, instance.x2, instance.y2,
         x1, y1, x2, y2)]
     self.select_frame_instances(instances)
     return len(instances) > 0
コード例 #2
0
ファイル: pick.py プロジェクト: carriercomm/anaconda
 def check(self):
     x1 = self.evaluate_index(0)
     y1 = self.evaluate_index(1)
     x2 = self.evaluate_index(2)
     y2 = self.evaluate_index(3)
     instances = [instance for instance in self.get_frame_instances()
         if collide_line(instance.x1, instance.y1, instance.x2, instance.y2,
         x1, y1, x2, y2)]
     self.select_frame_instances(instances)
     return len(instances) > 0
コード例 #3
0
 def check(self):
     x1 = self.evaluate_expression(self.get_parameter(0))
     y1 = self.evaluate_expression(self.get_parameter(1))
     x2 = self.evaluate_expression(self.get_parameter(2))
     y2 = self.evaluate_expression(self.get_parameter(3))
     instances = [
         instance for instance in self.get_frame_instances()
         if collide_line(instance.x1, instance.y1, instance.x2, instance.y2,
                         x1, y1, x2, y2)
     ]
     self.select_frame_instances(instances)
     return len(instances) > 0
コード例 #4
0
 def check(self):
     x1 = self.evaluate_index(0)
     y1 = self.evaluate_index(1)
     x2 = self.evaluate_index(2)
     y2 = self.evaluate_index(3)
     instances = [
         instance for instance in self.get_frame_instances()
         if collide_line(instance.x1, instance.y1, instance.x2, instance.y2,
                         x1, y1, x2, y2)
     ]
     self.select_frame_instances(instances)
     return len(instances) > 0