python:3 D箱詰め問題に関するアルゴリズム研究-4-2つの立方体が重なるか否かを判断する判断を解決する


def Projection3D(a,adata,b,bdata):
    """
              
       ,          , OXY,OXZ,OYZ               (       )
	"""
    overlap = 0 #        
    if b[0]>=a[0]+adata[0] or a[0]>=b[0]+bdata[0] or b[1]>=a[1]+adata[1] or a[1]>=b[1]+bdata[1]:
    	"""
    	   ,         
    	       ,                   (     )
    	   
    	"""
        # print("     ")
        pass
    else:
        # print("    ")
        overlap = overlap +1
    if b[0]>=a[0]+adata[0] or a[0]>=b[0]+bdata[0] or b[2]>=a[2]+adata[2] or a[2]>=b[2]+bdata[2]:
        # print("      ")
        pass
    else:
        # print("     ")
        overlap = overlap +1
    if b[1]>=a[1]+adata[1] or a[1]>=b[1]+bdata[1] or b[2]>=a[2]+adata[2] or a[2]>=b[2]+bdata[2]:
        # print("      ")
        pass
    else:
        # print("     ")
        overlap = overlap +1
    return overlap #       1