BIM: cleanup imports in bimcommands
This commit is contained in:
@@ -22,18 +22,15 @@
|
||||
|
||||
"""Misc Arch util commands"""
|
||||
|
||||
|
||||
import os
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
QT_TRANSLATE_NOOP = FreeCAD.Qt.QT_TRANSLATE_NOOP
|
||||
translate = FreeCAD.Qt.translate
|
||||
|
||||
PARAMS = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/BIM")
|
||||
|
||||
|
||||
|
||||
|
||||
class Arch_Add:
|
||||
"the Arch Add command definition"
|
||||
|
||||
|
||||
@@ -22,16 +22,16 @@
|
||||
|
||||
"""The BIM Axis-related commands"""
|
||||
|
||||
|
||||
import os
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
QT_TRANSLATE_NOOP = FreeCAD.Qt.QT_TRANSLATE_NOOP
|
||||
translate = FreeCAD.Qt.translate
|
||||
|
||||
PARAMS = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/BIM")
|
||||
|
||||
|
||||
|
||||
class Arch_Axis:
|
||||
|
||||
"the Arch Axis command definition"
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
"""The BIM Background command"""
|
||||
|
||||
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
|
||||
"""The BIM Box command"""
|
||||
|
||||
import os
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
@@ -141,7 +140,7 @@ class BIM_Box:
|
||||
def taskbox(self):
|
||||
"sets up a taskbox widget"
|
||||
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtGui
|
||||
|
||||
wid = QtGui.QWidget()
|
||||
ui = FreeCADGui.UiLoader()
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
"""The BIM Builder command"""
|
||||
|
||||
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
@@ -43,7 +42,6 @@ class BIM_Builder:
|
||||
}
|
||||
|
||||
def Activated(self):
|
||||
import PartGui
|
||||
FreeCADGui.runCommand("Part_Builder")
|
||||
|
||||
|
||||
|
||||
@@ -25,12 +25,12 @@
|
||||
# TODO: Refactor the Site code so it becomes a BuildingPart too
|
||||
|
||||
|
||||
import os
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
QT_TRANSLATE_NOOP = FreeCAD.Qt.QT_TRANSLATE_NOOP
|
||||
translate = FreeCAD.Qt.translate
|
||||
|
||||
PARAMS = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/BIM")
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ class Arch_Level:
|
||||
FreeCADGui.addModule("Arch")
|
||||
FreeCADGui.addModule("Draft")
|
||||
FreeCADGui.addModule("WorkingPlane")
|
||||
FreeCADGui.doCommand("obj = Arch.makeFloor(FreeCADGui.Selection.getSelection())")
|
||||
FreeCADGui.doCommand("obj = Arch.makeFloor(FreeCADGui.Selection.getSelection())")
|
||||
FreeCADGui.doCommand("obj.Placement = WorkingPlane.get_working_plane().get_placement()")
|
||||
FreeCADGui.doCommand("Draft.autogroup(obj)")
|
||||
FreeCAD.ActiveDocument.commitTransaction()
|
||||
|
||||
@@ -22,13 +22,14 @@
|
||||
|
||||
"""The BIM Classification command"""
|
||||
|
||||
import os
|
||||
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
import os
|
||||
|
||||
QT_TRANSLATE_NOOP = FreeCAD.Qt.QT_TRANSLATE_NOOP
|
||||
translate = FreeCAD.Qt.translate
|
||||
|
||||
PARAMS = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/BIM")
|
||||
|
||||
|
||||
@@ -306,7 +307,7 @@ class BIM_Classification:
|
||||
# self.spanTopLevels()
|
||||
|
||||
def updateByTree(self):
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtGui
|
||||
|
||||
# order by hierarchy
|
||||
def istop(obj):
|
||||
@@ -368,8 +369,8 @@ class BIM_Classification:
|
||||
self.form.treeObjects.expandAll()
|
||||
|
||||
def updateDefault(self):
|
||||
from PySide import QtGui
|
||||
import Draft
|
||||
from PySide import QtCore, QtGui
|
||||
|
||||
d = self.objectslist.copy()
|
||||
d.update(self.matlist)
|
||||
@@ -389,7 +390,7 @@ class BIM_Classification:
|
||||
self.form.treeObjects.setCurrentItem(it)
|
||||
|
||||
def updateClasses(self, search=""):
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtGui
|
||||
|
||||
self.form.treeClass.clear()
|
||||
|
||||
@@ -436,7 +437,7 @@ class BIM_Classification:
|
||||
first = False
|
||||
|
||||
def addChildren(self, children, parent, search=""):
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtGui
|
||||
|
||||
if children:
|
||||
for c in children:
|
||||
@@ -526,7 +527,8 @@ class BIM_Classification:
|
||||
)
|
||||
if not os.path.exists(preset):
|
||||
return None
|
||||
import codecs, re
|
||||
import codecs
|
||||
import re
|
||||
|
||||
d = Item()
|
||||
with codecs.open(preset, "r", "utf-8") as f:
|
||||
@@ -663,7 +665,7 @@ class BIM_Classification:
|
||||
def getIcon(self,obj):
|
||||
"""returns a QIcon for an object"""
|
||||
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtGui
|
||||
import Arch_rc
|
||||
|
||||
if hasattr(obj.ViewObject, "Icon"):
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
"""The BIM Common command"""
|
||||
|
||||
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
@@ -47,7 +46,6 @@ class BIM_Common:
|
||||
return v
|
||||
|
||||
def Activated(self):
|
||||
import PartGui
|
||||
FreeCADGui.runCommand("Part_Common")
|
||||
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
"""The BIM Compound command"""
|
||||
|
||||
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
@@ -47,7 +46,6 @@ class BIM_Compound:
|
||||
return v
|
||||
|
||||
def Activated(self):
|
||||
import PartGui
|
||||
FreeCADGui.runCommand("Part_Compound")
|
||||
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
"""The BIM Convert command"""
|
||||
|
||||
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
|
||||
@@ -22,13 +22,12 @@
|
||||
|
||||
"""Misc Arch util commands"""
|
||||
|
||||
|
||||
import os
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
QT_TRANSLATE_NOOP = FreeCAD.Qt.QT_TRANSLATE_NOOP
|
||||
translate = FreeCAD.Qt.translate
|
||||
|
||||
PARAMS = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/BIM")
|
||||
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
"""The BIM Cut command"""
|
||||
|
||||
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
@@ -46,7 +45,6 @@ class BIM_Cut:
|
||||
return v
|
||||
|
||||
def Activated(self):
|
||||
import PartGui
|
||||
FreeCADGui.runCommand("Part_Cut")
|
||||
|
||||
|
||||
|
||||
@@ -23,13 +23,12 @@
|
||||
|
||||
"""The Arch CutPlane command"""
|
||||
|
||||
|
||||
import os
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
QT_TRANSLATE_NOOP = FreeCAD.Qt.QT_TRANSLATE_NOOP
|
||||
translate = FreeCAD.Qt.translate
|
||||
|
||||
PARAMS = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/BIM")
|
||||
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
|
||||
"""The BIM Diff command"""
|
||||
|
||||
import os
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
@@ -49,7 +48,7 @@ class BIM_Diff:
|
||||
# make the main doc the active one before running this script!
|
||||
|
||||
# what will be compared: IDs, geometry, materials. Everything else is discarded.
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtGui
|
||||
import Draft
|
||||
|
||||
MOVE_TOLERANCE = 0.2 # the max allowed move in mm
|
||||
|
||||
@@ -24,9 +24,9 @@
|
||||
|
||||
"""The BIM DimensionAligned command"""
|
||||
|
||||
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
from draftguitools import gui_dimensions
|
||||
|
||||
QT_TRANSLATE_NOOP = FreeCAD.Qt.QT_TRANSLATE_NOOP
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
"""The BIM Door command"""
|
||||
|
||||
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
from bimcommands import BimWindow
|
||||
|
||||
@@ -22,14 +22,12 @@
|
||||
|
||||
"""The BIM DrawingView command"""
|
||||
|
||||
|
||||
import os
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
from bimcommands import BimBuildingPart
|
||||
|
||||
QT_TRANSLATE_NOOP = FreeCAD.Qt.QT_TRANSLATE_NOOP
|
||||
translate = FreeCAD.Qt.translate
|
||||
|
||||
PARAMS = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/BIM")
|
||||
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
"""The BIM EmptyTrash command"""
|
||||
|
||||
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
|
||||
@@ -22,13 +22,12 @@
|
||||
|
||||
"""BIM equipment commands"""
|
||||
|
||||
|
||||
import os
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
QT_TRANSLATE_NOOP = FreeCAD.Qt.QT_TRANSLATE_NOOP
|
||||
translate = FreeCAD.Qt.translate
|
||||
|
||||
PARAMS = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/BIM")
|
||||
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
"""The BIM Examples command"""
|
||||
|
||||
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
@@ -44,7 +43,7 @@ class BIM_Examples:
|
||||
}
|
||||
|
||||
def Activated(self):
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtGui
|
||||
QtGui.QDesktopServices.openUrl("https://github.com/yorikvanhavre/FreeCAD-BIM-examples")
|
||||
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
"""The BIM Extrude command"""
|
||||
|
||||
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
@@ -45,7 +44,6 @@ class BIM_Extrude:
|
||||
return v
|
||||
|
||||
def Activated(self):
|
||||
import PartGui
|
||||
FreeCADGui.runCommand("Part_Extrude")
|
||||
|
||||
|
||||
|
||||
@@ -22,13 +22,12 @@
|
||||
|
||||
"""BIM fence command"""
|
||||
|
||||
|
||||
import os
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
QT_TRANSLATE_NOOP = FreeCAD.Qt.QT_TRANSLATE_NOOP
|
||||
translate = FreeCAD.Qt.translate
|
||||
|
||||
PARAMS = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/BIM")
|
||||
|
||||
|
||||
|
||||
@@ -22,13 +22,12 @@
|
||||
|
||||
"""BIM Frame command"""
|
||||
|
||||
|
||||
import os
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
QT_TRANSLATE_NOOP = FreeCAD.Qt.QT_TRANSLATE_NOOP
|
||||
translate = FreeCAD.Qt.translate
|
||||
|
||||
PARAMS = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/BIM")
|
||||
|
||||
|
||||
@@ -62,4 +61,3 @@ class Arch_Frame:
|
||||
|
||||
|
||||
FreeCADGui.addCommand('Arch_Frame',Arch_Frame())
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
"""The BIM Fuse command"""
|
||||
|
||||
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
@@ -44,7 +43,6 @@ class BIM_Fuse:
|
||||
return v
|
||||
|
||||
def Activated(self):
|
||||
import PartGui
|
||||
FreeCADGui.runCommand("Part_Fuse")
|
||||
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
"""The BIM Glue command"""
|
||||
|
||||
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
"""The BIM Help command"""
|
||||
|
||||
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
@@ -44,7 +43,7 @@ class BIM_Help:
|
||||
}
|
||||
|
||||
def Activated(self):
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtGui
|
||||
QtGui.QDesktopServices.openUrl("https://www.freecadweb.org/wiki/BIM_Workbench")
|
||||
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
"""This module contains FreeCAD commands for the BIM workbench"""
|
||||
|
||||
import os
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
@@ -50,7 +49,7 @@ class BIM_IfcElements:
|
||||
|
||||
def Activated(self):
|
||||
import Draft
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtGui
|
||||
|
||||
# build objects list
|
||||
self.objectslist = {}
|
||||
@@ -634,7 +633,7 @@ if FreeCAD.GuiUp:
|
||||
def getIcon(obj):
|
||||
"""returns a QIcon for an object"""
|
||||
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtGui
|
||||
import Arch_rc
|
||||
|
||||
if hasattr(obj.ViewObject, "Icon"):
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
# ***************************************************************************
|
||||
|
||||
import os
|
||||
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
@@ -44,7 +45,7 @@ class BIM_IfcExplorer:
|
||||
|
||||
def Activated(self):
|
||||
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtGui
|
||||
|
||||
try:
|
||||
import ifcopenshell
|
||||
@@ -174,7 +175,7 @@ class BIM_IfcExplorer:
|
||||
"opens a file"
|
||||
|
||||
import ifcopenshell
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtGui
|
||||
|
||||
self.filename = ""
|
||||
lastfolder = FreeCAD.ParamGet(
|
||||
@@ -253,7 +254,7 @@ class BIM_IfcExplorer:
|
||||
"inserts selected objects in the active document"
|
||||
|
||||
from importers import importIFC
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtCore
|
||||
|
||||
doc = FreeCAD.ActiveDocument
|
||||
if doc and self.filename:
|
||||
@@ -472,7 +473,7 @@ class BIM_IfcExplorer:
|
||||
"adds the attributes of the given IFC entity under the given QTreeWidgetITem"
|
||||
|
||||
import ifcopenshell
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtGui
|
||||
|
||||
entity = self.ifc[eid]
|
||||
|
||||
@@ -555,7 +556,7 @@ class BIM_IfcExplorer:
|
||||
def addProperties(self, eid, parent):
|
||||
"adds properties of a given entity to the given QTReeWidgetItem"
|
||||
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtGui
|
||||
|
||||
entity = self.ifc[eid]
|
||||
if hasattr(entity, "IsDefinedBy"):
|
||||
@@ -585,7 +586,7 @@ class BIM_IfcExplorer:
|
||||
def onSelectTree(self, item, previous):
|
||||
"displays attributes and properties of a tree item"
|
||||
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtCore
|
||||
|
||||
self.backnav.append(previous)
|
||||
eid = item.data(0, QtCore.Qt.UserRole)
|
||||
@@ -628,7 +629,7 @@ class BIM_IfcExplorer:
|
||||
def onDoubleClickTree(self, item, column):
|
||||
"when a property or attribute is double-clicked"
|
||||
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtCore
|
||||
|
||||
if self.tree:
|
||||
txt = item.text(column)
|
||||
|
||||
@@ -26,11 +26,13 @@
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
QT_TRANSLATE_NOOP = FreeCAD.Qt.QT_TRANSLATE_NOOP
|
||||
translate = FreeCAD.Qt.translate
|
||||
|
||||
PARAMS = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/BIM")
|
||||
|
||||
|
||||
@@ -53,7 +55,7 @@ class BIM_IfcProperties:
|
||||
return v
|
||||
|
||||
def Activated(self):
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtGui
|
||||
|
||||
try:
|
||||
import ArchIFC
|
||||
@@ -244,7 +246,7 @@ class BIM_IfcProperties:
|
||||
return result
|
||||
|
||||
def updateByType(self):
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtGui
|
||||
|
||||
groups = {}
|
||||
for name, role in self.objectslist.items():
|
||||
@@ -278,7 +280,7 @@ class BIM_IfcProperties:
|
||||
self.spanTopLevels()
|
||||
|
||||
def updateByTree(self):
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtGui
|
||||
|
||||
# order by hierarchy
|
||||
def istop(obj):
|
||||
@@ -336,7 +338,7 @@ class BIM_IfcProperties:
|
||||
self.form.tree.expandAll()
|
||||
|
||||
def updateDefault(self):
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtGui
|
||||
|
||||
for name, role in self.objectslist.items():
|
||||
role = role[0]
|
||||
@@ -432,7 +434,7 @@ class BIM_IfcProperties:
|
||||
return props
|
||||
|
||||
def getSearchResults(self, obj):
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtGui
|
||||
|
||||
text = self.form.searchField.currentText()
|
||||
if not text:
|
||||
@@ -465,7 +467,7 @@ class BIM_IfcProperties:
|
||||
return QtGui.QStandardItem()
|
||||
|
||||
def updateProperties(self, sel1=None, sel2=None):
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtGui
|
||||
|
||||
self.propmodel.clear()
|
||||
self.propmodel.setHorizontalHeaderLabels(
|
||||
@@ -628,7 +630,7 @@ class BIM_IfcProperties:
|
||||
del self.objectslist[name][1][prop]
|
||||
|
||||
def addProperty(self, idx=0, pset=None, prop=None, ptype=None):
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtGui
|
||||
|
||||
if not self.form.tree.selectedIndexes():
|
||||
return
|
||||
@@ -685,7 +687,7 @@ class BIM_IfcProperties:
|
||||
self.form.comboProperty.setCurrentIndex(0)
|
||||
|
||||
def addPset(self, idx):
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtGui
|
||||
|
||||
if not self.form.tree.selectedIndexes():
|
||||
return
|
||||
@@ -732,7 +734,7 @@ class BIM_IfcProperties:
|
||||
self.form.comboPset.setCurrentIndex(0)
|
||||
|
||||
def removeProperty(self):
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtGui
|
||||
|
||||
sel = self.form.treeProperties.selectedIndexes()
|
||||
remove = []
|
||||
@@ -764,7 +766,7 @@ class BIM_IfcProperties:
|
||||
|
||||
|
||||
if FreeCAD.GuiUp:
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtGui
|
||||
|
||||
class propertiesDelegate(QtGui.QStyledItemDelegate):
|
||||
def __init__(self, parent=None, container=None, ptypes=[], plabels=[], *args):
|
||||
|
||||
@@ -24,13 +24,15 @@
|
||||
|
||||
"""This module contains FreeCAD commands for the BIM workbench"""
|
||||
|
||||
import os
|
||||
import csv
|
||||
import os
|
||||
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
QT_TRANSLATE_NOOP = FreeCAD.Qt.QT_TRANSLATE_NOOP
|
||||
translate = FreeCAD.Qt.translate
|
||||
|
||||
PARAMS = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/BIM")
|
||||
|
||||
QPROPS = [
|
||||
@@ -81,7 +83,7 @@ class BIM_IfcQuantities:
|
||||
return v
|
||||
|
||||
def Activated(self):
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtGui
|
||||
|
||||
# build objects list
|
||||
self.objectslist = {}
|
||||
@@ -329,7 +331,7 @@ class BIM_IfcQuantities:
|
||||
"""Updates a single line of the table, without updating
|
||||
the actual object"""
|
||||
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtCore
|
||||
|
||||
i = self.get_row(name)
|
||||
if i == -1:
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
"""The BIM ImagePlane command"""
|
||||
|
||||
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
|
||||
@@ -22,12 +22,12 @@
|
||||
|
||||
"""Layers manager for FreeCAD"""
|
||||
|
||||
import os
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
QT_TRANSLATE_NOOP = FreeCAD.Qt.QT_TRANSLATE_NOOP
|
||||
translate = FreeCAD.Qt.translate
|
||||
|
||||
PARAMS = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/BIM")
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ def getColorIcon(color):
|
||||
|
||||
"returns a QtGui.QIcon from a color 3-float tuple"
|
||||
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtGui
|
||||
|
||||
c = QtGui.QColor(int(color[0] * 255), int(color[1] * 255), int(color[2] * 255))
|
||||
im = QtGui.QImage(48, 48, QtGui.QImage.Format_ARGB32)
|
||||
@@ -64,7 +64,7 @@ class BIM_Layers:
|
||||
|
||||
def Activated(self):
|
||||
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtGui
|
||||
|
||||
# store changes to be committed
|
||||
self.deleteList = []
|
||||
@@ -441,7 +441,7 @@ class BIM_Layers:
|
||||
def onToggle(self):
|
||||
"toggle selected layers on/off"
|
||||
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtCore
|
||||
|
||||
state = None
|
||||
for index in self.dialog.tree.selectedIndexes():
|
||||
@@ -460,7 +460,7 @@ class BIM_Layers:
|
||||
def onIsolate(self):
|
||||
"isolates the selected layers (turns all the others off"
|
||||
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtCore
|
||||
|
||||
onrows = []
|
||||
for index in self.dialog.tree.selectedIndexes():
|
||||
@@ -473,7 +473,7 @@ class BIM_Layers:
|
||||
def onIFC(self):
|
||||
"attributes this layer to an IFC project"
|
||||
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtGui
|
||||
|
||||
for index in self.dialog.tree.selectedIndexes():
|
||||
if index.column() == 1:
|
||||
|
||||
@@ -24,9 +24,9 @@
|
||||
|
||||
"""The BIM Leader command"""
|
||||
|
||||
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
from draftguitools import gui_lines # Line tool from Draft
|
||||
|
||||
QT_TRANSLATE_NOOP = FreeCAD.Qt.QT_TRANSLATE_NOOP
|
||||
|
||||
@@ -25,13 +25,15 @@ from __future__ import print_function
|
||||
|
||||
"""The BIM library tool"""
|
||||
|
||||
import sys
|
||||
import os
|
||||
import sys
|
||||
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
QT_TRANSLATE_NOOP = FreeCAD.Qt.QT_TRANSLATE_NOOP
|
||||
translate = FreeCAD.Qt.translate
|
||||
|
||||
PARAMS = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/BIM")
|
||||
|
||||
FILTERS = [
|
||||
@@ -108,7 +110,7 @@ class BIM_Library_TaskPanel:
|
||||
|
||||
def __init__(self, offlinemode=False):
|
||||
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtGui
|
||||
|
||||
self.mainDocName = FreeCAD.Gui.ActiveDocument.Document.Name
|
||||
self.previewDocName = "Viewer"
|
||||
@@ -345,7 +347,9 @@ class BIM_Library_TaskPanel:
|
||||
def addtolibrary(self):
|
||||
# DISABLED
|
||||
|
||||
import Part, Mesh, os
|
||||
import os
|
||||
import Mesh
|
||||
import Part
|
||||
|
||||
self.fileDialog = QtGui.QFileDialog.getSaveFileName(
|
||||
None, "Save As", self.librarypath
|
||||
@@ -380,7 +384,6 @@ class BIM_Library_TaskPanel:
|
||||
|
||||
def setSearchModel(self, text):
|
||||
|
||||
import PartGui
|
||||
from PySide import QtGui
|
||||
|
||||
def add_line(f, dp):
|
||||
@@ -445,7 +448,6 @@ class BIM_Library_TaskPanel:
|
||||
def setOnlineModel(self):
|
||||
|
||||
from PySide import QtGui
|
||||
import PartGui
|
||||
|
||||
def addItems(root, d, path):
|
||||
for k, v in d.items():
|
||||
@@ -813,8 +815,8 @@ class BIM_Library_TaskPanel:
|
||||
def getOnlineContentsAPI(self, url):
|
||||
"""same as getOnlineContents but uses github API (faster)"""
|
||||
|
||||
import requests
|
||||
import json
|
||||
import requests
|
||||
|
||||
result = {}
|
||||
count = 0
|
||||
|
||||
@@ -22,12 +22,12 @@
|
||||
|
||||
"""This module contains FreeCAD commands for the BIM workbench"""
|
||||
|
||||
import os
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
QT_TRANSLATE_NOOP = FreeCAD.Qt.QT_TRANSLATE_NOOP
|
||||
translate = FreeCAD.Qt.translate
|
||||
|
||||
PARAMS = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/BIM")
|
||||
|
||||
if FreeCAD.GuiUp:
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
|
||||
"""BIM nudge commands"""
|
||||
|
||||
import os
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
@@ -36,7 +35,7 @@ class BIM_Nudge:
|
||||
def getNudgeValue(self, mode):
|
||||
"mode can be dist, up, down, left, right. dist returns a float in mm, other modes return a 3D vector"
|
||||
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtGui
|
||||
|
||||
mw = FreeCADGui.getMainWindow()
|
||||
if mw:
|
||||
@@ -136,7 +135,7 @@ class BIM_Nudge_Switch(BIM_Nudge):
|
||||
}
|
||||
|
||||
def Activated(self):
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtGui
|
||||
|
||||
mw = FreeCADGui.getMainWindow()
|
||||
if mw:
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
"""The BIM Offset command"""
|
||||
|
||||
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
@@ -46,7 +45,6 @@ class BIM_Offset2D:
|
||||
return v
|
||||
|
||||
def Activated(self):
|
||||
import PartGui
|
||||
FreeCADGui.runCommand("Part_Offset2D")
|
||||
|
||||
|
||||
|
||||
@@ -22,8 +22,6 @@
|
||||
|
||||
"""BIM Panel-related Arch_"""
|
||||
|
||||
|
||||
import os
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
@@ -334,7 +332,6 @@ class NestTaskPanel:
|
||||
def __init__(self,obj=None):
|
||||
|
||||
import ArchNesting
|
||||
from PySide import QtCore, QtGui
|
||||
self.form = FreeCADGui.PySideUic.loadUi(":/ui/ArchNest.ui")
|
||||
self.form.progressBar.hide()
|
||||
self.form.ButtonPreview.setEnabled(False)
|
||||
|
||||
@@ -22,13 +22,12 @@
|
||||
|
||||
"""BIM Panel-related Arch_"""
|
||||
|
||||
|
||||
import os
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
QT_TRANSLATE_NOOP = FreeCAD.Qt.QT_TRANSLATE_NOOP
|
||||
translate = FreeCAD.Qt.translate
|
||||
|
||||
PARAMS = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/BIM")
|
||||
|
||||
|
||||
|
||||
@@ -22,9 +22,11 @@
|
||||
|
||||
"""This module contains FreeCAD commands for the BIM workbench"""
|
||||
|
||||
|
||||
import sys
|
||||
import importlib
|
||||
import inspect
|
||||
import os
|
||||
import sys
|
||||
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
@@ -32,10 +34,6 @@ QT_TRANSLATE_NOOP = FreeCAD.Qt.QT_TRANSLATE_NOOP
|
||||
translate = FreeCAD.Qt.translate
|
||||
|
||||
|
||||
import importlib
|
||||
import inspect
|
||||
|
||||
|
||||
tests = [
|
||||
"testAll",
|
||||
"testIFC4",
|
||||
@@ -80,7 +78,7 @@ class BIM_Preflight:
|
||||
class BIM_Preflight_TaskPanel:
|
||||
|
||||
def __init__(self):
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtGui
|
||||
|
||||
self.results = {} # to store the result message
|
||||
self.culprits = {} # to store objects to highlight
|
||||
@@ -156,12 +154,12 @@ class BIM_Preflight_TaskPanel:
|
||||
self.customTests[butname] = func
|
||||
|
||||
def getStandardButtons(self):
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtGui
|
||||
|
||||
return QtGui.QDialogButtonBox.Close
|
||||
|
||||
def reject(self):
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtGui
|
||||
|
||||
QtGui.QApplication.restoreOverrideCursor()
|
||||
FreeCADGui.Control.closeDialog()
|
||||
@@ -170,7 +168,7 @@ class BIM_Preflight_TaskPanel:
|
||||
def passed(self, test):
|
||||
"sets the button as passed"
|
||||
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtGui
|
||||
|
||||
getattr(self.form, test).setIcon(QtGui.QIcon(":/icons/button_valid.svg"))
|
||||
getattr(self.form, test).setText(translate("BIM", "Passed"))
|
||||
@@ -181,7 +179,7 @@ class BIM_Preflight_TaskPanel:
|
||||
def failed(self, test):
|
||||
"sets the button as failed"
|
||||
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtGui
|
||||
|
||||
getattr(self.form, test).setIcon(QtGui.QIcon(":/icons/process-stop.svg"))
|
||||
getattr(self.form, test).setText("Failed")
|
||||
@@ -192,7 +190,7 @@ class BIM_Preflight_TaskPanel:
|
||||
def reset(self, test):
|
||||
"reset the button"
|
||||
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtGui
|
||||
|
||||
getattr(self.form, test).setIcon(QtGui.QIcon(":/icons/button_right.svg"))
|
||||
getattr(self.form, test).setText(translate("BIM", "Test"))
|
||||
@@ -293,7 +291,7 @@ class BIM_Preflight_TaskPanel:
|
||||
def testAll(self):
|
||||
"runs all tests"
|
||||
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtGui
|
||||
from draftutils import todo
|
||||
|
||||
for test in tests:
|
||||
@@ -698,6 +696,7 @@ class BIM_Preflight_TaskPanel:
|
||||
def testQuantities(self):
|
||||
"tests for explicit quantities export"
|
||||
|
||||
import Draft
|
||||
from PySide import QtCore, QtGui
|
||||
|
||||
test = "testQuantities"
|
||||
|
||||
@@ -22,13 +22,12 @@
|
||||
|
||||
"""BIM Panel-related Arch_"""
|
||||
|
||||
|
||||
import os
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
QT_TRANSLATE_NOOP = FreeCAD.Qt.QT_TRANSLATE_NOOP
|
||||
translate = FreeCAD.Qt.translate
|
||||
|
||||
PARAMS = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/BIM")
|
||||
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
"""The BIM Project command - Includes previous Arch Project"""
|
||||
|
||||
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
|
||||
@@ -22,10 +22,9 @@
|
||||
|
||||
"""This module contains FreeCAD commands for the BIM workbench"""
|
||||
|
||||
|
||||
import os
|
||||
import sys
|
||||
import math
|
||||
import os
|
||||
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
@@ -49,7 +48,7 @@ class BIM_ProjectManager:
|
||||
|
||||
import FreeCADGui
|
||||
import ArchBuildingPart
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtGui
|
||||
|
||||
self.form = FreeCADGui.PySideUic.loadUi(":/ui/dialogProjectManager.ui")
|
||||
self.project = None
|
||||
@@ -413,7 +412,7 @@ class BIM_ProjectManager:
|
||||
|
||||
def savePreset(self):
|
||||
import Arch
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtGui
|
||||
|
||||
res = QtGui.QInputDialog.getText(
|
||||
None,
|
||||
@@ -648,7 +647,7 @@ class BIM_ProjectManager:
|
||||
)
|
||||
|
||||
d.Meta = values
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtGui
|
||||
|
||||
filename = QtGui.QFileDialog.getSaveFileName(
|
||||
QtGui.QApplication.activeWindow(),
|
||||
@@ -670,7 +669,7 @@ class BIM_ProjectManager:
|
||||
"""loads the contents of a template into the current file"""
|
||||
|
||||
import FreeCADGui
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtGui
|
||||
|
||||
filename = QtGui.QFileDialog.getOpenFileName(
|
||||
QtGui.QApplication.activeWindow(),
|
||||
|
||||
@@ -22,13 +22,12 @@
|
||||
|
||||
"""BIM Rebar command"""
|
||||
|
||||
|
||||
import os
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
QT_TRANSLATE_NOOP = FreeCAD.Qt.QT_TRANSLATE_NOOP
|
||||
translate = FreeCAD.Qt.translate
|
||||
|
||||
PARAMS = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/BIM")
|
||||
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
"""This module contains FreeCAD commands for the BIM workbench"""
|
||||
|
||||
import os
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
|
||||
@@ -22,13 +22,12 @@
|
||||
|
||||
"""BIM Rebar command"""
|
||||
|
||||
|
||||
import os
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
QT_TRANSLATE_NOOP = FreeCAD.Qt.QT_TRANSLATE_NOOP
|
||||
translate = FreeCAD.Qt.translate
|
||||
|
||||
PARAMS = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/BIM")
|
||||
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
|
||||
"""This module contains FreeCAD commands for the BIM workbench"""
|
||||
|
||||
import os
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
@@ -57,7 +56,7 @@ class BIM_Reorder:
|
||||
class BIM_Reorder_TaskPanel:
|
||||
|
||||
def __init__(self, obj):
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtGui
|
||||
|
||||
self.obj = obj
|
||||
self.form = FreeCADGui.PySideUic.loadUi(":/ui/dialogReorder.ui")
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
"""The BIM Rewire command"""
|
||||
|
||||
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
|
||||
@@ -22,13 +22,12 @@
|
||||
|
||||
"""BIM Roof command"""
|
||||
|
||||
|
||||
import os
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
QT_TRANSLATE_NOOP = FreeCAD.Qt.QT_TRANSLATE_NOOP
|
||||
translate = FreeCAD.Qt.translate
|
||||
|
||||
PARAMS = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/BIM")
|
||||
|
||||
|
||||
@@ -83,4 +82,3 @@ class Arch_Roof:
|
||||
|
||||
|
||||
FreeCADGui.addCommand("Arch_Roof", Arch_Roof())
|
||||
|
||||
|
||||
@@ -22,13 +22,12 @@
|
||||
|
||||
"""BIM Schedule command"""
|
||||
|
||||
|
||||
import os
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
QT_TRANSLATE_NOOP = FreeCAD.Qt.QT_TRANSLATE_NOOP
|
||||
translate = FreeCAD.Qt.translate
|
||||
|
||||
PARAMS = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/BIM")
|
||||
|
||||
|
||||
|
||||
@@ -22,13 +22,12 @@
|
||||
|
||||
"""BIM Schedule command"""
|
||||
|
||||
|
||||
import os
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
QT_TRANSLATE_NOOP = FreeCAD.Qt.QT_TRANSLATE_NOOP
|
||||
translate = FreeCAD.Qt.translate
|
||||
|
||||
PARAMS = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/BIM")
|
||||
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
@@ -396,7 +397,7 @@ class BIM_Setup:
|
||||
)
|
||||
|
||||
def setPreset(self, preset=None):
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtGui
|
||||
|
||||
unit = None
|
||||
decimals = None
|
||||
@@ -650,11 +651,11 @@ class BIM_Setup:
|
||||
ifcok = True
|
||||
if not ifcok:
|
||||
# ifcopenshell not installed
|
||||
import re
|
||||
import json
|
||||
from PySide import QtGui
|
||||
import zipfile
|
||||
import re
|
||||
from urllib import request
|
||||
import zipfile
|
||||
from PySide import QtGui
|
||||
|
||||
if not FreeCAD.GuiUp:
|
||||
reply = QtGui.QMessageBox.Yes
|
||||
|
||||
@@ -24,9 +24,9 @@
|
||||
|
||||
"""The BIM ShapeView command"""
|
||||
|
||||
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
from draftguitools import gui_shape2dview
|
||||
|
||||
QT_TRANSLATE_NOOP = FreeCAD.Qt.QT_TRANSLATE_NOOP
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
"""The BIM SimpleCopy command"""
|
||||
|
||||
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
@@ -47,7 +46,6 @@ class BIM_SimpleCopy:
|
||||
return v
|
||||
|
||||
def Activated(self):
|
||||
import PartGui
|
||||
FreeCADGui.runCommand("Part_SimpleCopy")
|
||||
|
||||
|
||||
|
||||
@@ -25,12 +25,12 @@
|
||||
# TODO: Refactor the Site code so it becomes a BuildingPart too
|
||||
|
||||
|
||||
import os
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
QT_TRANSLATE_NOOP = FreeCAD.Qt.QT_TRANSLATE_NOOP
|
||||
translate = FreeCAD.Qt.translate
|
||||
|
||||
PARAMS = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/BIM")
|
||||
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
"""The Bim Sketch command"""
|
||||
|
||||
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
|
||||
@@ -22,13 +22,12 @@
|
||||
|
||||
"""BIM Schedule command"""
|
||||
|
||||
|
||||
import os
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
QT_TRANSLATE_NOOP = FreeCAD.Qt.QT_TRANSLATE_NOOP
|
||||
translate = FreeCAD.Qt.translate
|
||||
|
||||
PARAMS = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/BIM")
|
||||
|
||||
|
||||
|
||||
@@ -22,13 +22,12 @@
|
||||
|
||||
"""BIM Schedule command"""
|
||||
|
||||
|
||||
import os
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
QT_TRANSLATE_NOOP = FreeCAD.Qt.QT_TRANSLATE_NOOP
|
||||
translate = FreeCAD.Qt.translate
|
||||
|
||||
PARAMS = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/BIM")
|
||||
|
||||
|
||||
|
||||
@@ -24,10 +24,10 @@
|
||||
|
||||
"""The BIM TDPage command"""
|
||||
|
||||
import os
|
||||
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
import os
|
||||
|
||||
QT_TRANSLATE_NOOP = FreeCAD.Qt.QT_TRANSLATE_NOOP
|
||||
translate = FreeCAD.Qt.translate
|
||||
@@ -49,7 +49,7 @@ class BIM_TDPage:
|
||||
return v
|
||||
|
||||
def Activated(self):
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtGui
|
||||
import TechDraw
|
||||
|
||||
templatedir = FreeCAD.ParamGet(
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
"""The BIM TD View command"""
|
||||
|
||||
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
"""This module contains BIM wrappers for commands from other workbenches"""
|
||||
|
||||
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
@@ -87,4 +86,3 @@ class BIM_Text:
|
||||
|
||||
|
||||
FreeCADGui.addCommand("BIM_Text", BIM_Text())
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
QT_TRANSLATE_NOOP = FreeCAD.Qt.QT_TRANSLATE_NOOP
|
||||
|
||||
PARAMS = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/BIM")
|
||||
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
"""The BIM Trash command"""
|
||||
|
||||
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
|
||||
@@ -22,13 +22,12 @@
|
||||
|
||||
"""BIM Truss command"""
|
||||
|
||||
|
||||
import os
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
QT_TRANSLATE_NOOP = FreeCAD.Qt.QT_TRANSLATE_NOOP
|
||||
translate = FreeCAD.Qt.translate
|
||||
|
||||
PARAMS = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/BIM")
|
||||
|
||||
|
||||
|
||||
@@ -22,13 +22,14 @@
|
||||
|
||||
"""This is the tutorial of the BIM workbench"""
|
||||
|
||||
|
||||
import os
|
||||
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
QT_TRANSLATE_NOOP = FreeCAD.Qt.QT_TRANSLATE_NOOP
|
||||
translate = FreeCAD.Qt.translate
|
||||
|
||||
PARAMS = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/BIM")
|
||||
|
||||
|
||||
@@ -91,7 +92,9 @@ class BIM_Tutorial:
|
||||
QtCore.QTimer.singleShot(1000, self.load)
|
||||
|
||||
def load(self, arg=None):
|
||||
import re, sys, codecs
|
||||
import codecs
|
||||
import re
|
||||
import sys
|
||||
|
||||
if sys.version_info.major < 3:
|
||||
import urllib2
|
||||
@@ -212,7 +215,7 @@ class BIM_Tutorial:
|
||||
self.update()
|
||||
|
||||
def update(self):
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtCore
|
||||
|
||||
if not hasattr(self, "form") or not self.form or not hasattr(self, "dock"):
|
||||
return
|
||||
@@ -271,7 +274,7 @@ class BIM_Tutorial:
|
||||
QtCore.QTimer.singleShot(TESTINTERVAL, self.checkGoals)
|
||||
|
||||
def checkGoals(self):
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtCore
|
||||
|
||||
if not hasattr(self, "form"):
|
||||
return
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
"""The BIM Ungroup command"""
|
||||
|
||||
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
|
||||
@@ -23,11 +23,13 @@
|
||||
"""The BIM Views command"""
|
||||
|
||||
import sys
|
||||
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
QT_TRANSLATE_NOOP = FreeCAD.Qt.QT_TRANSLATE_NOOP
|
||||
translate = FreeCAD.Qt.translate
|
||||
|
||||
UPDATEINTERVAL = 2000 # number of milliseconds between BIM Views window update
|
||||
PARAMS = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/BIM")
|
||||
|
||||
|
||||
@@ -22,13 +22,12 @@
|
||||
|
||||
"""BIM wall command"""
|
||||
|
||||
|
||||
import os
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
QT_TRANSLATE_NOOP = FreeCAD.Qt.QT_TRANSLATE_NOOP
|
||||
translate = FreeCAD.Qt.translate
|
||||
|
||||
PARAMS = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/BIM")
|
||||
|
||||
|
||||
|
||||
@@ -22,11 +22,11 @@
|
||||
|
||||
"""This module contains FreeCAD commands for the BIM workbench"""
|
||||
|
||||
import os
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
QT_TRANSLATE_NOOP = FreeCAD.Qt.QT_TRANSLATE_NOOP
|
||||
|
||||
PARAMS = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/BIM")
|
||||
|
||||
|
||||
@@ -41,8 +41,6 @@ class BIM_Welcome:
|
||||
}
|
||||
|
||||
def Activated(self):
|
||||
from PySide import QtCore, QtGui
|
||||
|
||||
self.form = FreeCADGui.PySideUic.loadUi(":ui/dialogWelcome.ui")
|
||||
|
||||
# handle the tutorial links
|
||||
|
||||
@@ -22,13 +22,14 @@
|
||||
|
||||
"""BIM window command"""
|
||||
|
||||
|
||||
import os
|
||||
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
QT_TRANSLATE_NOOP = FreeCAD.Qt.QT_TRANSLATE_NOOP
|
||||
translate = FreeCAD.Qt.translate
|
||||
|
||||
PARAMS = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/BIM")
|
||||
ALLOWEDHOSTS = ["Wall","Structure","Roof"]
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
|
||||
"""The BIM Windows Manager command"""
|
||||
|
||||
import os
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
@@ -52,7 +51,7 @@ class BIM_Windows:
|
||||
class BIM_Windows_TaskPanel:
|
||||
|
||||
def __init__(self):
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide import QtGui
|
||||
|
||||
self.form = FreeCADGui.PySideUic.loadUi(":/ui/dialogWindows.ui")
|
||||
self.form.setWindowIcon(QtGui.QIcon(":/icons/BIM_Windows.svg"))
|
||||
@@ -78,7 +77,8 @@ class BIM_Windows_TaskPanel:
|
||||
FreeCAD.ActiveDocument.recompute()
|
||||
|
||||
def update(self, index=None):
|
||||
import Draft, Arch_rc
|
||||
import Draft
|
||||
import Arch_rc
|
||||
from PySide import QtGui
|
||||
|
||||
self.form.windows.clear()
|
||||
@@ -214,7 +214,8 @@ class BIM_Windows_TaskPanel:
|
||||
self.update()
|
||||
|
||||
def setMaterial(self):
|
||||
import Draft, Arch_rc
|
||||
import Draft
|
||||
import Arch_rc
|
||||
from PySide import QtGui
|
||||
|
||||
form = FreeCADGui.PySideUic.loadUi(":/ui/dialogMaterialChooser.ui")
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import glob
|
||||
import os
|
||||
|
||||
import Arch_rc
|
||||
import PartGui
|
||||
import os
|
||||
import glob
|
||||
|
||||
# populate the list of submodules
|
||||
modules = glob.glob(os.path.join(os.path.dirname(__file__), "*.py"))
|
||||
|
||||
Reference in New Issue
Block a user