I have a script which worked well with FC 0.19 but failed with FC 0.18. I get the following error:
here below is the piece of code.Exception while processing file: sript.py [module 'Draft' has no attribute 'make_wire']
what could be the issue ?
thanks in advance for your help
Code: Select all
from __future__ import unicode_literals
__title__= "_"
__author__= "_"
__date__= "_"
__version__= "01"
import sys
# add folder containing FreeCAD.pyd, FreeCADGui.pyd to sys.path
sys.path.append("/usr/lib/freecad/lib")
import FreeCAD, FreeCADGui
import ImportGui
from FreeCAD import Base
import Draft, PartDesign, Part, Import
doc = App.newDocument()
fichier = "/home/user/Documents/project/geometry/points.txt"
file = open(fichier, "r")
wire = []
X=Y=Z = 0.0
for ligne in file:
coordinates = ligne.split()
try: # for format PCD ignore the header
X,Y,Z = coordinates # separate the coordinates
print(X," ",Y," ",Z)
wire.append(FreeCAD.Vector(float(X),float(Y),float(Z))) # append the coordinates
except Exception:
None
file.close()
# wire creation
Draft.make_wire(wire, closed=True, face=True, support=None) # create the wire closed
doc.recompute()