diff --git a/src/Mod/Arch/Arch.py b/src/Mod/Arch/Arch.py index d75197fd99..2a2c785ded 100644 --- a/src/Mod/Arch/Arch.py +++ b/src/Mod/Arch/Arch.py @@ -35,8 +35,8 @@ __url__ = "https://www.freecadweb.org" import FreeCAD if FreeCAD.GuiUp: - import FreeCADGui - FreeCADGui.updateLocale() + import FreeCADGui + FreeCADGui.updateLocale() from ArchWall import * from ArchFloor import * diff --git a/src/Mod/Arch/ArchAxis.py b/src/Mod/Arch/ArchAxis.py index a535d6c4a1..004f39368a 100644 --- a/src/Mod/Arch/ArchAxis.py +++ b/src/Mod/Arch/ArchAxis.py @@ -19,8 +19,12 @@ #* * #*************************************************************************** +import math -import FreeCAD, Part, Draft, math, ArchCommands +import FreeCAD +import ArchCommands +import Draft +import Part from FreeCAD import Vector if FreeCAD.GuiUp: import FreeCADGui, re diff --git a/src/Mod/Arch/ArchAxisSystem.py b/src/Mod/Arch/ArchAxisSystem.py index c9daa5c8aa..523cae250d 100644 --- a/src/Mod/Arch/ArchAxisSystem.py +++ b/src/Mod/Arch/ArchAxisSystem.py @@ -19,9 +19,11 @@ #* * #*************************************************************************** -import FreeCAD, DraftGeomUtils +import FreeCAD +import DraftGeomUtils if FreeCAD.GuiUp: - import FreeCADGui, Draft + import FreeCADGui + import Draft from PySide import QtCore, QtGui from draftutils.translate import translate from pivy import coin diff --git a/src/Mod/Arch/ArchBuilding.py b/src/Mod/Arch/ArchBuilding.py index a574b15017..28dc676b4b 100644 --- a/src/Mod/Arch/ArchBuilding.py +++ b/src/Mod/Arch/ArchBuilding.py @@ -20,7 +20,10 @@ #* * #*************************************************************************** -import FreeCAD,Draft,ArchCommands,ArchFloor +import FreeCAD +import ArchCommands +import ArchFloor +import Draft if FreeCAD.GuiUp: import FreeCADGui from PySide import QtCore diff --git a/src/Mod/Arch/ArchBuildingPart.py b/src/Mod/Arch/ArchBuildingPart.py index 8047e6758a..5a2db4df6c 100644 --- a/src/Mod/Arch/ArchBuildingPart.py +++ b/src/Mod/Arch/ArchBuildingPart.py @@ -398,7 +398,8 @@ class BuildingPart(ArchIFC.IfcProduct): if deltar: #child.Placement.Rotation = child.Placement.Rotation.multiply(deltar) - not enough, child must also move # use shape methods to obtain a correct placement - import Part,math + import Part + import math shape = Part.Shape() shape.Placement = child.Placement #print("angle before rotation:",shape.Placement.Rotation.Angle) diff --git a/src/Mod/Arch/ArchCommands.py b/src/Mod/Arch/ArchCommands.py index 9b29c6d04b..433a6331fe 100644 --- a/src/Mod/Arch/ArchCommands.py +++ b/src/Mod/Arch/ArchCommands.py @@ -20,7 +20,10 @@ #* * #*************************************************************************** -import FreeCAD,Draft,ArchComponent,DraftVecUtils +import FreeCAD +import ArchComponent +import Draft +import DraftVecUtils from FreeCAD import Vector if FreeCAD.GuiUp: import FreeCADGui @@ -354,7 +357,8 @@ def makeFace(wires,method=2,cleanup=False): def closeHole(shape): '''closeHole(shape): closes a hole in an open shape''' - import DraftGeomUtils, Part + import DraftGeomUtils + import Part # creating an edges lookup table lut = {} for face in shape.Faces: @@ -461,7 +465,9 @@ def getCutVolume(cutplane,shapes,clip=False,depth=None): return cutface,cutvolume,invcutvolume def getShapeFromMesh(mesh,fast=True,tolerance=0.001,flat=False,cut=True): - import Part, MeshPart, DraftGeomUtils + import Part + import MeshPart + import DraftGeomUtils if mesh.isSolid() and (mesh.countComponents() == 1) and fast: # use the best method faces = [] @@ -1153,7 +1159,8 @@ def toggleIfcBrepFlag(obj): def makeCompoundFromSelected(objects=None): """makeCompoundFromSelected([objects]): Creates a new compound object from the given subobjects (faces, edges) or from the selection if objects is None""" - import FreeCADGui,Part + import FreeCADGui + import Part so = [] if not objects: objects = FreeCADGui.Selection.getSelectionEx() @@ -1169,7 +1176,8 @@ def makeCompoundFromSelected(objects=None): def cleanArchSplitter(objects=None): """cleanArchSplitter([objects]): removes the splitters from the base shapes of the given Arch objects or selected Arch objects if objects is None""" - import FreeCAD,FreeCADGui + import FreeCAD + import FreeCADGui if not objects: objects = FreeCADGui.Selection.getSelection() if not isinstance(objects,list): @@ -1189,7 +1197,8 @@ 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,Part + import FreeCAD + import Part if not objects and FreeCAD.GuiUp: objects = FreeCADGui.Selection.getSelection() if not isinstance(objects,list): diff --git a/src/Mod/Arch/ArchComponent.py b/src/Mod/Arch/ArchComponent.py index df2ac49100..26c4d5d596 100644 --- a/src/Mod/Arch/ArchComponent.py +++ b/src/Mod/Arch/ArchComponent.py @@ -31,7 +31,10 @@ __title__ = "FreeCAD Arch Component" __author__ = "Yorik van Havre" __url__ = "https://www.freecadweb.org" -import FreeCAD,Draft,ArchCommands,ArchIFC +import FreeCAD +import ArchCommands +import ArchIFC +import Draft if FreeCAD.GuiUp: import FreeCADGui from PySide import QtGui,QtCore @@ -713,7 +716,8 @@ class Component(ArchIFC.IfcProduct): The base shape, with the additions and subtractions performed. """ - import Draft,Part + import Draft + import Part #print("Processing subshapes of ",obj.Label, " : ",obj.Additions) if placement: @@ -986,7 +990,8 @@ class Component(ArchIFC.IfcProduct): obj.PerimeterLength = 0 return - import TechDraw, Part + import Part + import TechDraw fmax = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Arch").GetInt("MaxComputeAreas",20) if len(obj.Shape.Faces) > fmax: obj.VerticalArea = 0 @@ -1972,7 +1977,10 @@ class ComponentTaskPanel: return if not isinstance(self.obj.IfcProperties,dict): return - import Arch_rc, csv, os, ArchIFCSchema + import Arch_rc + import csv + import os + import ArchIFCSchema # get presets self.ptypes = list(ArchIFCSchema.IfcTypes.keys()) diff --git a/src/Mod/Arch/ArchCutPlane.py b/src/Mod/Arch/ArchCutPlane.py index a5ab2a48e2..fc90b80ec1 100644 --- a/src/Mod/Arch/ArchCutPlane.py +++ b/src/Mod/Arch/ArchCutPlane.py @@ -20,7 +20,9 @@ #* * #***************************************************************************** -import FreeCAD, Draft, ArchCommands +import FreeCAD +import Draft +import ArchCommands if FreeCAD.GuiUp: import FreeCADGui from PySide import QtCore, QtGui diff --git a/src/Mod/Arch/ArchEquipment.py b/src/Mod/Arch/ArchEquipment.py index 72782f491f..f1cb1588fb 100644 --- a/src/Mod/Arch/ArchEquipment.py +++ b/src/Mod/Arch/ArchEquipment.py @@ -24,7 +24,9 @@ __title__ = "FreeCAD Equipment" __author__ = "Yorik van Havre" __url__ = "https://www.freecadweb.org" -import FreeCAD,ArchComponent,DraftVecUtils +import FreeCAD +import ArchComponent +import DraftVecUtils if FreeCAD.GuiUp: import FreeCADGui from PySide import QtGui @@ -76,7 +78,10 @@ def createMeshView(obj,direction=FreeCAD.Vector(0,0,-1),outeronly=False,largesto outeronly is True, only the outer contour is taken into consideration, discarding the inner holes. If largestonly is True, only the largest segment of the given mesh will be used.""" - import Mesh, math, Part, DraftGeomUtils + import math + import DraftGeomUtils + import Mesh + import Part if not obj.isDerivedFrom("Mesh::Feature"): return mesh = obj.Mesh diff --git a/src/Mod/Arch/ArchFloor.py b/src/Mod/Arch/ArchFloor.py index 90c9281f25..5b63e946e1 100644 --- a/src/Mod/Arch/ArchFloor.py +++ b/src/Mod/Arch/ArchFloor.py @@ -28,7 +28,11 @@ superseded by the use of the BuildingPart class, set to the "Building Storey" IfcType. """ -import FreeCAD,Draft,ArchCommands, DraftVecUtils, ArchIFC +import FreeCAD +import ArchCommands +import ArchIFC +import Draft +import DraftVecUtils if FreeCAD.GuiUp: import FreeCADGui from draftutils.translate import translate diff --git a/src/Mod/Arch/ArchFrame.py b/src/Mod/Arch/ArchFrame.py index ef71bd69ed..df6a0ab622 100644 --- a/src/Mod/Arch/ArchFrame.py +++ b/src/Mod/Arch/ArchFrame.py @@ -19,7 +19,10 @@ #* * #*************************************************************************** -import FreeCAD,Draft,ArchComponent,DraftVecUtils +import FreeCAD +import ArchComponent +import Draft +import DraftVecUtils if FreeCAD.GuiUp: import FreeCADGui from draftutils.translate import translate @@ -162,7 +165,9 @@ class _Frame(ArchComponent.Component): for w in obj.Profile.Shape.Wires: if not w.isClosed(): return - import DraftGeomUtils, Part, math + import math + import DraftGeomUtils + import Part baseprofile = obj.Profile.Shape.copy() if hasattr(obj,"ProfilePlacement"): if not obj.ProfilePlacement.isNull(): diff --git a/src/Mod/Arch/ArchGrid.py b/src/Mod/Arch/ArchGrid.py index ed9a46921e..d2db21d909 100644 --- a/src/Mod/Arch/ArchGrid.py +++ b/src/Mod/Arch/ArchGrid.py @@ -19,7 +19,10 @@ #* * #*************************************************************************** -import FreeCAD, Part, math +import math + +import FreeCAD +import Part if FreeCAD.GuiUp: import FreeCADGui from PySide import QtCore, QtGui diff --git a/src/Mod/Arch/ArchIFC.py b/src/Mod/Arch/ArchIFC.py index f2c439932f..ccb066589c 100644 --- a/src/Mod/Arch/ArchIFC.py +++ b/src/Mod/Arch/ArchIFC.py @@ -25,7 +25,10 @@ and attributes of Arch/BIM objects. """ -import FreeCAD,json +import json + +import FreeCAD +import ArchIFCSchema if FreeCAD.GuiUp: from PySide.QtCore import QT_TRANSLATE_NOOP @@ -33,8 +36,6 @@ else: def QT_TRANSLATE_NOOP(ctx,txt): return txt -import ArchIFCSchema - def uncamel(t): return ''.join(map(lambda x: x if x.islower() else " "+x, t[3:]))[1:] diff --git a/src/Mod/Arch/ArchIFCSchema.py b/src/Mod/Arch/ArchIFCSchema.py index 7a503151e5..917b0a2c3a 100644 --- a/src/Mod/Arch/ArchIFCSchema.py +++ b/src/Mod/Arch/ArchIFCSchema.py @@ -26,7 +26,10 @@ Provides the data as IfcContexts, IfcProducts and IfcTypes. """ -import FreeCAD, os, json +import os +import json + +import FreeCAD ifcVersions = ["IFC4", "IFC2X3"] IfcVersion = ifcVersions[FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Arch").GetInt("IfcVersion",0)] diff --git a/src/Mod/Arch/ArchIFCView.py b/src/Mod/Arch/ArchIFCView.py index 0ba706eb62..4703d492b2 100644 --- a/src/Mod/Arch/ArchIFCView.py +++ b/src/Mod/Arch/ArchIFCView.py @@ -21,7 +21,8 @@ """View providers and UI elements for the Ifc classes.""" -import FreeCAD, ArchIFC +import FreeCAD +import ArchIFC if FreeCAD.GuiUp: import FreeCADGui diff --git a/src/Mod/Arch/ArchNesting.py b/src/Mod/Arch/ArchNesting.py index 25c3dcd86f..fe9dc0296c 100644 --- a/src/Mod/Arch/ArchNesting.py +++ b/src/Mod/Arch/ArchNesting.py @@ -20,11 +20,15 @@ #* * #*************************************************************************** - - -import FreeCAD, Part, DraftGeomUtils, WorkingPlane, DraftVecUtils, math +import math from datetime import datetime +import FreeCAD +import DraftGeomUtils +import DraftVecUtils +import Part +import WorkingPlane + # This is roughly based on the no-fit polygon algorithm, used in # SvgNest: https://github.com/Jack000/SVGnest # Wikihouse plugin: https://github.com/tav/wikihouse-plugin/blob/master/wikihouse.rb diff --git a/src/Mod/Arch/ArchPanel.py b/src/Mod/Arch/ArchPanel.py index 69353e73ed..9762ddbb20 100644 --- a/src/Mod/Arch/ArchPanel.py +++ b/src/Mod/Arch/ArchPanel.py @@ -19,7 +19,14 @@ #* * #*************************************************************************** -import FreeCAD,Draft,ArchComponent,DraftVecUtils,ArchCommands,math, Part +import math + +import FreeCAD +import ArchCommands +import ArchComponent +import Draft +import DraftVecUtils +import Part from FreeCAD import Vector if FreeCAD.GuiUp: import FreeCADGui @@ -846,7 +853,8 @@ class PanelCut(Draft.DraftObject): base = None n = None if Draft.getType(obj.Source) == "Panel": - import Part,DraftGeomUtils + import DraftGeomUtils + import Part baseobj = None if obj.Source.CloneOf: baseobj = obj.Source.CloneOf.Base diff --git a/src/Mod/Arch/ArchPipe.py b/src/Mod/Arch/ArchPipe.py index ab6e2b6843..b0874e7466 100644 --- a/src/Mod/Arch/ArchPipe.py +++ b/src/Mod/Arch/ArchPipe.py @@ -20,9 +20,11 @@ #* * #*************************************************************************** -import FreeCAD, ArchComponent +import FreeCAD +import ArchComponent if FreeCAD.GuiUp: - import FreeCADGui, Arch_rc + import FreeCADGui + import Arch_rc from draftutils.translate import translate from PySide.QtCore import QT_TRANSLATE_NOOP else: @@ -214,7 +216,9 @@ class _ArchPipe(ArchComponent.Component): def execute(self,obj): - import Part,DraftGeomUtils,math + import math + import Part + import DraftGeomUtils pl = obj.Placement w = self.getWire(obj) if not w: @@ -372,7 +376,10 @@ class _ArchPipeConnector(ArchComponent.Component): tol = 1 # tolerance for alignment. This is only visual, we can keep it low... ptol = 0.001 # tolerance for coincident points - import math,Part,DraftGeomUtils,ArchCommands + import math + import Part + import DraftGeomUtils + import ArchCommands if len(obj.Pipes) < 2: return if len(obj.Pipes) > 3: diff --git a/src/Mod/Arch/ArchProfile.py b/src/Mod/Arch/ArchProfile.py index e0e23c03c6..c017315365 100644 --- a/src/Mod/Arch/ArchProfile.py +++ b/src/Mod/Arch/ArchProfile.py @@ -30,10 +30,12 @@ __url__ = "https://www.freecadweb.org" # This module provides tools to build base profiles # for Arch Structure elements - -import FreeCAD, Draft, os -from FreeCAD import Vector import csv +import os + +import FreeCAD +import Draft +from FreeCAD import Vector if FreeCAD.GuiUp: import FreeCADGui diff --git a/src/Mod/Arch/ArchProject.py b/src/Mod/Arch/ArchProject.py index 73f206969b..4dedc39805 100644 --- a/src/Mod/Arch/ArchProject.py +++ b/src/Mod/Arch/ArchProject.py @@ -25,7 +25,9 @@ objects specifically for better IFC compatibility, allowing the user to tweak certain IFC relevant values. """ -import FreeCAD,ArchIFC,ArchIFCView +import FreeCAD +import ArchIFC +import ArchIFCView if FreeCAD.GuiUp: import FreeCADGui from draftutils.translate import translate diff --git a/src/Mod/Arch/ArchRebar.py b/src/Mod/Arch/ArchRebar.py index 72da61e576..c88b536dd4 100644 --- a/src/Mod/Arch/ArchRebar.py +++ b/src/Mod/Arch/ArchRebar.py @@ -20,7 +20,11 @@ #*************************************************************************** # Modified Amritpal Singh on 07-07-2017 -import FreeCAD,Draft,ArchComponent,DraftVecUtils,ArchCommands +import FreeCAD +import Draft +import ArchComponent +import DraftVecUtils +import ArchCommands if FreeCAD.GuiUp: import FreeCADGui from draftutils.translate import translate @@ -548,7 +552,8 @@ class _ViewProviderRebar(ArchComponent.ViewProviderComponent): if hasattr(obj.Proxy,"wires"): if obj.Proxy.wires: from pivy import coin - import re,Part + import Part + import re self.centerline = coin.SoSeparator() comp = Part.makeCompound(obj.Proxy.wires) pts = re.findall("point \[(.*?)\]",comp.writeInventor().replace("\n","")) diff --git a/src/Mod/Arch/ArchSite.py b/src/Mod/Arch/ArchSite.py index 3ef39c8aa9..c5d4e4cba8 100644 --- a/src/Mod/Arch/ArchSite.py +++ b/src/Mod/Arch/ArchSite.py @@ -24,7 +24,15 @@ containers for Arch objects, and also define a terrain surface. """ -import FreeCAD,Draft,ArchCommands,ArchComponent,math,re,datetime,ArchIFC +import datetime +import math +import re + +import FreeCAD +import ArchCommands +import ArchComponent +import ArchIFC +import Draft if FreeCAD.GuiUp: import FreeCADGui @@ -758,7 +766,8 @@ class _Site(ArchIFC.IfcProduct): obj.SubtractionVolume = 0 return - import TechDraw, Part + import TechDraw + import Part area = 0 perim = 0 addvol = 0 diff --git a/src/Mod/Arch/ArchSpace.py b/src/Mod/Arch/ArchSpace.py index 2d6ed8f3ec..bf5ed96ce3 100644 --- a/src/Mod/Arch/ArchSpace.py +++ b/src/Mod/Arch/ArchSpace.py @@ -145,7 +145,11 @@ ConditioningTypes = [ "NaturallyVentedOnly" ] -import FreeCAD,ArchComponent,ArchCommands,Draft +import FreeCAD +import ArchComponent +import ArchCommands +import Draft + if FreeCAD.GuiUp: import FreeCADGui from PySide import QtCore, QtGui @@ -465,7 +469,8 @@ class _Space(ArchComponent.Component): "returns a face that represents the footprint of this space" - import Part,DraftGeomUtils + import Part + import DraftGeomUtils if not hasattr(obj.Shape,"CenterOfMass"): return None try: diff --git a/src/Mod/Arch/ArchVRM.py b/src/Mod/Arch/ArchVRM.py index cc3896fc1f..6764a37579 100644 --- a/src/Mod/Arch/ArchVRM.py +++ b/src/Mod/Arch/ArchVRM.py @@ -21,7 +21,13 @@ "The FreeCAD Arch Vector Rendering Module" -import FreeCAD,math,Part,ArchCommands,DraftVecUtils,DraftGeomUtils +import math + +import FreeCAD +import ArchCommands +import DraftVecUtils +import DraftGeomUtils +import Part ## @package ArchVRM # \ingroup ARCH diff --git a/src/Mod/Arch/ArchWall.py b/src/Mod/Arch/ArchWall.py index 9e6d2d9513..1d11f39faf 100644 --- a/src/Mod/Arch/ArchWall.py +++ b/src/Mod/Arch/ArchWall.py @@ -802,7 +802,8 @@ class _Wall(ArchComponent.Component): if self.clone(obj): return - import Part, DraftGeomUtils + import Part + import DraftGeomUtils base = None pl = obj.Placement extdata = self.getExtrusionData(obj) @@ -1098,7 +1099,8 @@ class _Wall(ArchComponent.Component): placement needed to move the face back from the (0,0,0) origin. """ - import Part,DraftGeomUtils + import Part + import DraftGeomUtils # If ArchComponent.Component.getExtrusionData() can successfully get # extrusion data, just use that. diff --git a/src/Mod/Arch/ArchWindow.py b/src/Mod/Arch/ArchWindow.py index 3f1504ebae..d4c7d37205 100644 --- a/src/Mod/Arch/ArchWindow.py +++ b/src/Mod/Arch/ArchWindow.py @@ -21,7 +21,11 @@ import os -import FreeCAD, Draft, ArchComponent, DraftVecUtils, ArchCommands +import FreeCAD +import ArchCommands +import ArchComponent +import Draft +import DraftVecUtils import ArchWindowPresets from FreeCAD import Units from FreeCAD import Vector @@ -524,7 +528,8 @@ class _CommandWindow: path = self.librarypresets[i-len(WindowPresets)][1] if path.lower().endswith(".fcstd"): try: - import zipfile,tempfile + import tempfile + import zipfile except Exception: pass else: @@ -667,7 +672,9 @@ class _Window(ArchComponent.Component): def buildShapes(self,obj): - import Part,DraftGeomUtils,math + import Part + import DraftGeomUtils + import math self.sshapes = [] self.vshapes = [] shapes = [] @@ -877,7 +884,9 @@ class _Window(ArchComponent.Component): self.boxes = clonedProxy.boxes return - import Part,DraftGeomUtils,math + import Part + import DraftGeomUtils + import math pl = obj.Placement base = None self.sshapes = [] diff --git a/src/Mod/Arch/ArchWindowPresets.py b/src/Mod/Arch/ArchWindowPresets.py index 6c731b586a..f61c7d31c2 100644 --- a/src/Mod/Arch/ArchWindowPresets.py +++ b/src/Mod/Arch/ArchWindowPresets.py @@ -40,7 +40,8 @@ def makeWindowPreset(windowtype,width,height,h1,h2,h3,w1,w2,o1,o2,placement=None def makeSketch(windowtype,width,height,h1,h2,h3,w1,w2,o1,o2): - import Part,Sketcher + import Part + import Sketcher width = float(width) height = float(height) h1 = float(h1) diff --git a/src/Mod/Arch/Dice3DS/dom3ds.py b/src/Mod/Arch/Dice3DS/dom3ds.py index 994b7d0734..e592bdf9a6 100644 --- a/src/Mod/Arch/Dice3DS/dom3ds.py +++ b/src/Mod/Arch/Dice3DS/dom3ds.py @@ -16,7 +16,8 @@ data of the second object like this: """ -import sys, struct +import sys +import struct import numpy diff --git a/src/Mod/Arch/exportIFCHelper.py b/src/Mod/Arch/exportIFCHelper.py index fabf327516..b996a7cb86 100644 --- a/src/Mod/Arch/exportIFCHelper.py +++ b/src/Mod/Arch/exportIFCHelper.py @@ -20,13 +20,11 @@ # *************************************************************************** import json -import ifcopenshell import math - import FreeCAD # import Draft - +import ifcopenshell def getObjectsOfIfcType(objects, ifcType): results = [] diff --git a/src/Mod/Arch/importGBXML.py b/src/Mod/Arch/importGBXML.py index cefa77f93b..d424f2d614 100644 --- a/src/Mod/Arch/importGBXML.py +++ b/src/Mod/Arch/importGBXML.py @@ -23,7 +23,8 @@ __title__ = "FreeCAD GbXml exporter" __author__ = "Yorik van Havre" __url__ = "https://www.freecadweb.org" -import FreeCAD,Draft +import FreeCAD +import Draft if FreeCAD.GuiUp: from draftutils.translate import translate diff --git a/src/Mod/Arch/importJSON.py b/src/Mod/Arch/importJSON.py index 263e1b08c8..32133898f9 100644 --- a/src/Mod/Arch/importJSON.py +++ b/src/Mod/Arch/importJSON.py @@ -21,9 +21,13 @@ """FreeCAD JSON exporter""" -import FreeCAD, Mesh, Draft, Part import json +import FreeCAD +import Draft +import Mesh +import Part + if FreeCAD.GuiUp: import FreeCADGui from draftutils.translate import translate diff --git a/src/Mod/Arch/importOBJ.py b/src/Mod/Arch/importOBJ.py index 4e35459beb..99e4ac375e 100644 --- a/src/Mod/Arch/importOBJ.py +++ b/src/Mod/Arch/importOBJ.py @@ -19,8 +19,19 @@ #* * #*************************************************************************** -import FreeCAD, DraftGeomUtils, Part, Draft, Arch, Mesh, MeshPart, os, codecs, ntpath +import os +import codecs +import ntpath # import numpy as np + +import FreeCAD +import Arch +import Draft +import DraftGeomUtils +import Mesh +import MeshPart +import Part + if FreeCAD.GuiUp: from draftutils.translate import translate else: diff --git a/src/Mod/Arch/importSH3D.py b/src/Mod/Arch/importSH3D.py index 891a2cd0db..bb1a522556 100644 --- a/src/Mod/Arch/importSH3D.py +++ b/src/Mod/Arch/importSH3D.py @@ -23,7 +23,17 @@ __title__ = "FreeCAD SweetHome3D Importer" __author__ = "Yorik van Havre" __url__ = "https://www.freecadweb.org" -import os,zipfile,xml.sax,FreeCAD,Part,Draft,Arch,Mesh,tempfile,math +import math +import os +import tempfile +import xml.sax +import zipfile + +import FreeCAD +import Arch +import Draft +import Mesh +import Part ## @package importSH3D # \ingroup ARCH