Update deploying_3_3.py
Browse files- deploying_3_3.py +3 -1
deploying_3_3.py
CHANGED
|
@@ -1244,7 +1244,7 @@ def get_hatched_areas(datadoc,filename,FinalRatio,rotationangle,SearchArray):
|
|
| 1244 |
hatched_areas.append([vertices, area1, perimeter, rgb_color])
|
| 1245 |
|
| 1246 |
elif path.type == 2:
|
| 1247 |
-
|
| 1248 |
# factor controls approximation density: control_points_count * factor
|
| 1249 |
try:
|
| 1250 |
path.spline_edges_to_line_edges(factor=8) # increase factor for finer approx
|
|
@@ -2156,6 +2156,7 @@ def mainFunctionDrawImgPdf(datadoc,dxfpath, dxfratio,SearchArray,pdfpath=0,pdfna
|
|
| 2156 |
height=abs(page2.mediabox[3])+abs(page2.mediabox[1])
|
| 2157 |
print('mediabox', width , height)
|
| 2158 |
|
|
|
|
| 2159 |
correction_factor= detect_scale_from_page(dxfpath,width,dxfratio/1000)
|
| 2160 |
|
| 2161 |
factor=1
|
|
@@ -2168,6 +2169,7 @@ def mainFunctionDrawImgPdf(datadoc,dxfpath, dxfratio,SearchArray,pdfpath=0,pdfna
|
|
| 2168 |
print('Ratio was adjusted to be ur input ratio x2')
|
| 2169 |
|
| 2170 |
dxfratio=dxfratio*factor
|
|
|
|
| 2171 |
if page2.rotation!=0:
|
| 2172 |
|
| 2173 |
rotationangle = page2.rotation
|
|
|
|
| 1244 |
hatched_areas.append([vertices, area1, perimeter, rgb_color])
|
| 1245 |
|
| 1246 |
elif path.type == 2:
|
| 1247 |
+
# convert any spline edges to line edges (approximates splines)
|
| 1248 |
# factor controls approximation density: control_points_count * factor
|
| 1249 |
try:
|
| 1250 |
path.spline_edges_to_line_edges(factor=8) # increase factor for finer approx
|
|
|
|
| 2156 |
height=abs(page2.mediabox[3])+abs(page2.mediabox[1])
|
| 2157 |
print('mediabox', width , height)
|
| 2158 |
|
| 2159 |
+
print('olddxfratio',dxfratio)
|
| 2160 |
correction_factor= detect_scale_from_page(dxfpath,width,dxfratio/1000)
|
| 2161 |
|
| 2162 |
factor=1
|
|
|
|
| 2169 |
print('Ratio was adjusted to be ur input ratio x2')
|
| 2170 |
|
| 2171 |
dxfratio=dxfratio*factor
|
| 2172 |
+
print('new dxfratio', dxfratio)
|
| 2173 |
if page2.rotation!=0:
|
| 2174 |
|
| 2175 |
rotationangle = page2.rotation
|