Draft: ImportDXF: CURRENTDXFLIB is not obsolete and should be kept

This commit is contained in:
Roy-043
2023-09-27 15:41:40 +02:00
parent 0fd66ad64c
commit a9e224cdae

View File

@@ -47,8 +47,8 @@ texts, colors,layers (from groups)
"""
# scaling factor between autocad font sizes and coin font sizes
TEXTSCALING = 1.35
# the minimum version of the dxfLibrary needed to run - OBSOLETE - not used anymore
# CURRENTDXFLIB = 1.41
# the minimum version of the dxfLibrary needed to run
CURRENTDXFLIB = 1.41
import sys
import os
@@ -116,10 +116,8 @@ def errorDXFLib(gui):
files = ['dxfColorMap.py', 'dxfImportObjects.py',
'dxfLibrary.py', 'dxfReader.py']
_weburl = 'https://raw.githubusercontent.com/yorikvanhavre/'
_weburl += 'Draft-dxf-importer/'
# baseurl = _weburl + '{0:.2f}'.format(CURRENTDXFLIB) + "/"
baseurl = _weburl + "master/"
baseurl = 'https://raw.githubusercontent.com/yorikvanhavre/'
baseurl += 'Draft-dxf-importer/master/'
import ArchCommands
from FreeCAD import Base
progressbar = Base.ProgressIndicator()
@@ -194,7 +192,7 @@ def getDXFlibs():
libsok = False
FCC.PrintWarning("DXF libraries not found. Trying to download...\n")
else:
if "v"+str(CURRENTDXFLIB) in dxfLibrary.__version__:
if float(dxfLibrary.__version__[1:5]) >= CURRENTDXFLIB:
libsok = True
else:
FCC.PrintWarning("DXF libraries need to be updated. "