View Single Post
  #3  
Old 11-29-2011, 10:32 AM
AySz88 AySz88 is offline
Member
 
Join Date: Aug 2011
Posts: 13
Instead of this:
Code:
for pos in box_pos:
    if box_pos [0]== 3.0 and pos[1] == 4.0 and pos[2] == -5.0:
      print box_pos, 'The Box is connected properly move to next connection'
you want something more like this:

Code:
if box_pos[0] == 3.0 and box_pos[1] == 4.0 and box_pos[2] == -5.0:
  print box_pos, 'The Box is connected properly move to next connection'
...

You may also want to compare positions approximately (i.e. "abs(box_pos[0] - 3.0) < 1e-3") to avoid any problems with rounding error.
Reply With Quote