Fixed bug: Importing IFC in Console raises error because it linked with FreeeCADGui module.

This commit is contained in:
Amritpal Singh
2020-11-23 18:19:20 +05:30
parent 01b21e0d06
commit be37e43376

View File

@@ -1202,8 +1202,9 @@ def cleanArchSplitter(objects=None):
def rebuildArchShape(objects=None):
"""rebuildArchShape([objects]): takes the faces from the base shape of the given (or selected
if objects is None) Arch objects, and tries to rebuild a valid solid from them."""
import FreeCAD,FreeCADGui,Part
if not objects:
import FreeCAD,Part
if not objects and FreeCAD.GuiUp:
import FreeCADGui
objects = FreeCADGui.Selection.getSelection()
if not isinstance(objects,list):
objects = [objects]