fixed bug #556 - Premature loading of modules

The Draft and Arch modules now load heavy modules such
as Part or Sketch only when they use them, not anymore
at Init time.
This commit is contained in:
Yorik van Havre
2011-12-31 17:16:51 -02:00
parent a9d2f1c678
commit b8bcb43b66
16 changed files with 89 additions and 30 deletions

View File

@@ -21,8 +21,8 @@
#* *
#***************************************************************************
import FreeCAD,FreeCADGui,Part,Draft,ArchComponent
from draftlibs import fcgeo,fcvec
import FreeCAD,FreeCADGui,Draft,ArchComponent
from draftlibs import fcvec
from FreeCAD import Vector
from PyQt4 import QtCore
@@ -94,6 +94,8 @@ class _Structure(ArchComponent.Component):
self.createGeometry(obj)
def createGeometry(self,obj):
import Part
from draftlibs import fcgeo
# getting default values
height = normal = None
if obj.Length: