Spaces:
Sleeping
Sleeping
Update Code_2_7.py
Browse files- Code_2_7.py +8 -8
Code_2_7.py
CHANGED
|
@@ -1689,8 +1689,8 @@ def adjustannotations(OutputPdfStage1,text_with_positions,CollectedColors):
|
|
| 1689 |
(None, None)
|
| 1690 |
)
|
| 1691 |
matched_text2, matched_nbs2 = matched_entry2
|
| 1692 |
-
print("2nd entry nbs: " ,type(matched_nbs2))
|
| 1693 |
-
print("2nd entry text: ",type(matched_text2))
|
| 1694 |
combined2 = ""
|
| 1695 |
if matched_text2 and matched_nbs2:
|
| 1696 |
combined2 = f"{matched_text2} - {matched_nbs2}"
|
|
@@ -1989,8 +1989,8 @@ def draw_bb_onPDF(doc,bbox):
|
|
| 1989 |
return pdf_bbox
|
| 1990 |
|
| 1991 |
def mainFunctionDrawImgPdf(datadoc,dxfpath, dxfratio,SearchArray,CorrectionRatio,CollectedColors,points_Of_drawing_Canvas,Thickness,pdfpath=0,pdfname=0,pdf_content=0):
|
| 1992 |
-
print("points_Of_drawing_Canvas in 2.7 = ",points_Of_drawing_Canvas)
|
| 1993 |
-
print("CollectedColors in 2.7 = ",CollectedColors)
|
| 1994 |
OutputPdfStage1='BB Trial.pdf'
|
| 1995 |
if pdf_content:
|
| 1996 |
FinalRatio,width_dxf= RetriveRatio(datadoc,dxfpath,pdf_content)
|
|
@@ -2276,7 +2276,7 @@ def mainFunctionDrawImgPdf(datadoc,dxfpath, dxfratio,SearchArray,CorrectionRatio
|
|
| 2276 |
points.append(chosen_end)
|
| 2277 |
discard = False
|
| 2278 |
# if(points_Of_drawing_Canvas):
|
| 2279 |
-
print("Canva points = ",points_Of_drawing_Canvas)
|
| 2280 |
if(points_Of_drawing_Canvas):
|
| 2281 |
Boundingpolygon = np.array(
|
| 2282 |
[(p.x, p.y) for p in points_Of_drawing_Canvas],
|
|
@@ -2314,7 +2314,7 @@ def mainFunctionDrawImgPdf(datadoc,dxfpath, dxfratio,SearchArray,CorrectionRatio
|
|
| 2314 |
points.append(chosen_start)
|
| 2315 |
points.append(chosen_end)
|
| 2316 |
discard = False
|
| 2317 |
-
print("Canva points = ",points_Of_drawing_Canvas)
|
| 2318 |
if(points_Of_drawing_Canvas):
|
| 2319 |
Boundingpolygon = np.array(
|
| 2320 |
[(p.x, p.y) for p in points_Of_drawing_Canvas],
|
|
@@ -2365,7 +2365,7 @@ def mainFunctionDrawImgPdf(datadoc,dxfpath, dxfratio,SearchArray,CorrectionRatio
|
|
| 2365 |
points.append(max_pair_start)
|
| 2366 |
points.append(max_pair_end)
|
| 2367 |
discard = False
|
| 2368 |
-
print("Canva points = ",points_Of_drawing_Canvas)
|
| 2369 |
if(points_Of_drawing_Canvas):
|
| 2370 |
Boundingpolygon = np.array(
|
| 2371 |
[(p.x, p.y) for p in points_Of_drawing_Canvas],
|
|
@@ -2393,7 +2393,7 @@ def mainFunctionDrawImgPdf(datadoc,dxfpath, dxfratio,SearchArray,CorrectionRatio
|
|
| 2393 |
|
| 2394 |
|
| 2395 |
discard = False
|
| 2396 |
-
print("Canva points = ",points_Of_drawing_Canvas)
|
| 2397 |
if(points_Of_drawing_Canvas):
|
| 2398 |
Boundingpolygon = np.array(
|
| 2399 |
[(p.x, p.y) for p in points_Of_drawing_Canvas],
|
|
|
|
| 1689 |
(None, None)
|
| 1690 |
)
|
| 1691 |
matched_text2, matched_nbs2 = matched_entry2
|
| 1692 |
+
# print("2nd entry nbs: " ,type(matched_nbs2))
|
| 1693 |
+
# print("2nd entry text: ",type(matched_text2))
|
| 1694 |
combined2 = ""
|
| 1695 |
if matched_text2 and matched_nbs2:
|
| 1696 |
combined2 = f"{matched_text2} - {matched_nbs2}"
|
|
|
|
| 1989 |
return pdf_bbox
|
| 1990 |
|
| 1991 |
def mainFunctionDrawImgPdf(datadoc,dxfpath, dxfratio,SearchArray,CorrectionRatio,CollectedColors,points_Of_drawing_Canvas,Thickness,pdfpath=0,pdfname=0,pdf_content=0):
|
| 1992 |
+
# print("points_Of_drawing_Canvas in 2.7 = ",points_Of_drawing_Canvas)
|
| 1993 |
+
# print("CollectedColors in 2.7 = ",CollectedColors)
|
| 1994 |
OutputPdfStage1='BB Trial.pdf'
|
| 1995 |
if pdf_content:
|
| 1996 |
FinalRatio,width_dxf= RetriveRatio(datadoc,dxfpath,pdf_content)
|
|
|
|
| 2276 |
points.append(chosen_end)
|
| 2277 |
discard = False
|
| 2278 |
# if(points_Of_drawing_Canvas):
|
| 2279 |
+
# print("Canva points = ",points_Of_drawing_Canvas)
|
| 2280 |
if(points_Of_drawing_Canvas):
|
| 2281 |
Boundingpolygon = np.array(
|
| 2282 |
[(p.x, p.y) for p in points_Of_drawing_Canvas],
|
|
|
|
| 2314 |
points.append(chosen_start)
|
| 2315 |
points.append(chosen_end)
|
| 2316 |
discard = False
|
| 2317 |
+
# print("Canva points = ",points_Of_drawing_Canvas)
|
| 2318 |
if(points_Of_drawing_Canvas):
|
| 2319 |
Boundingpolygon = np.array(
|
| 2320 |
[(p.x, p.y) for p in points_Of_drawing_Canvas],
|
|
|
|
| 2365 |
points.append(max_pair_start)
|
| 2366 |
points.append(max_pair_end)
|
| 2367 |
discard = False
|
| 2368 |
+
# print("Canva points = ",points_Of_drawing_Canvas)
|
| 2369 |
if(points_Of_drawing_Canvas):
|
| 2370 |
Boundingpolygon = np.array(
|
| 2371 |
[(p.x, p.y) for p in points_Of_drawing_Canvas],
|
|
|
|
| 2393 |
|
| 2394 |
|
| 2395 |
discard = False
|
| 2396 |
+
# print("Canva points = ",points_Of_drawing_Canvas)
|
| 2397 |
if(points_Of_drawing_Canvas):
|
| 2398 |
Boundingpolygon = np.array(
|
| 2399 |
[(p.x, p.y) for p in points_Of_drawing_Canvas],
|