fix  design ifsingle为true 但 没有print的 异常检测取消
This commit is contained in:
zhouchengrong
2024-06-24 15:31:39 +08:00
parent 1db39d4c39
commit d827147e8a

View File

@@ -99,9 +99,7 @@ class PrintPainting(object):
elif result['print']["location"] == [] or result['print']["location"] is None: elif result['print']["location"] == [] or result['print']["location"] is None:
result['print']["location"] = [[0, 0]] result['print']["location"] = [[0, 0]]
if result['print']['IfSingle']: if result['print']['IfSingle']:
if len(result['print']['print_path_list']) == 0: if len(result['print']['print_path_list']) > 0:
raise ValueError('When there is no printing, ifsingle must be false')
print_background = np.zeros((result['pattern_image'].shape[0], result['pattern_image'].shape[1], 3), dtype=np.uint8) print_background = np.zeros((result['pattern_image'].shape[0], result['pattern_image'].shape[1], 3), dtype=np.uint8)
mask_background = np.zeros((result['pattern_image'].shape[0], result['pattern_image'].shape[1], 3), dtype=np.uint8) mask_background = np.zeros((result['pattern_image'].shape[0], result['pattern_image'].shape[1], 3), dtype=np.uint8)
# print_background = np.full((result['pattern_image'].shape[0], result['pattern_image'].shape[1], 3), 255, dtype=np.uint8) # print_background = np.full((result['pattern_image'].shape[0], result['pattern_image'].shape[1], 3), 255, dtype=np.uint8)