Marthee commited on
Commit
1bf15b7
·
verified ·
1 Parent(s): 9582d18

Update dxf__omar3_2.py

Browse files
Files changed (1) hide show
  1. dxf__omar3_2.py +14 -14
dxf__omar3_2.py CHANGED
@@ -2158,20 +2158,20 @@ def mainFunctionDrawImgPdf(datadoc,dxfpath, dxfratio,SearchArray,pdfpath=0,pdfna
2158
  height=abs(page2.mediabox[3])+abs(page2.mediabox[1])
2159
  print('mediabox', width , height)
2160
 
2161
- print('olddxfratio',dxfratio)
2162
- correction_factor= detect_scale_from_page(dxfpath,width,dxfratio/1000)
2163
-
2164
- factor=1
2165
- print('corr_factor',correction_factor)
2166
- if correction_factor <0.26: #if less than 0.25 then the dxf ratio is correeect, if greater then *2
2167
- factor=1
2168
- print('Ratio working: keep as it is')
2169
- else:
2170
- factor =2
2171
- print('Ratio was adjusted to be ur input ratio x2')
2172
-
2173
- dxfratio=dxfratio*factor
2174
- print('new dxfratio', dxfratio)
2175
  if page2.rotation!=0:
2176
 
2177
  rotationangle = page2.rotation
 
2158
  height=abs(page2.mediabox[3])+abs(page2.mediabox[1])
2159
  print('mediabox', width , height)
2160
 
2161
+ # print('olddxfratio',dxfratio)
2162
+ # correction_factor= detect_scale_from_page(dxfpath,width,dxfratio/1000)
2163
+
2164
+ # factor=1
2165
+ # print('corr_factor',correction_factor)
2166
+ # if correction_factor <0.26: #if less than 0.25 then the dxf ratio is correeect, if greater then *2
2167
+ # factor=1
2168
+ # print('Ratio working: keep as it is')
2169
+ # else:
2170
+ # factor =2
2171
+ # print('Ratio was adjusted to be ur input ratio x2')
2172
+
2173
+ # dxfratio=dxfratio*factor
2174
+ # print('new dxfratio', dxfratio)
2175
  if page2.rotation!=0:
2176
 
2177
  rotationangle = page2.rotation