Skip to content

Commit

Permalink
BIM: Trim trailing newlines
Browse files Browse the repository at this point in the history
  • Loading branch information
luzpaz authored and wwmayer committed Jul 14, 2024
1 parent a4862b6 commit 25e8aac
Show file tree
Hide file tree
Showing 20 changed files with 36 additions and 36 deletions.
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting any of the community admins or moderators at
reported by contacting any of the community admins or moderators at
https://forum.freecad.org/memberlist.php?mode=team . All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
Expand Down
4 changes: 2 additions & 2 deletions PRIVACY_POLICY.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# FreeCAD Privacy Policy
# FreeCAD Privacy Policy

The FreeCAD application does not collect, transmit, share or use any Personal Data.

Expand Down Expand Up @@ -27,6 +27,6 @@ When reading the online version of the User Manual within FreeCAD, manual conten

FreeCAD is Free Software and therefore may be packaged by other people, who may include additional software or modify the source code. We do not vouch for these third-party packages and cannot tell you what they contain and what they do regarding your privacy. The official packages are explicitly listed in our download page.


- [based on the GIMP privacy policy](https://www.gimp.org/about/privacy.html)

4 changes: 2 additions & 2 deletions src/Mod/BIM/ArchBuildingPart.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ def onChanged(self,obj,prop):
def execute(self,obj):

"gather all the child shapes into a compound"

pl = obj.Placement
shapes,materialstable = self.getShapes(obj)
if shapes:
Expand All @@ -323,7 +323,7 @@ def execute(self,obj):
obj.ViewObject.Proxy.onChanged(obj.ViewObject,"AutoGroupBox")

def getMovableChildren(self, obj):

"recursively get movable children"

result = []
Expand Down
4 changes: 2 additions & 2 deletions src/Mod/BIM/ArchRoof.py
Original file line number Diff line number Diff line change
Expand Up @@ -744,10 +744,10 @@ def getSubVolume(self, obj):
# Not only the solid of the base object itself be subtracted from
# a Wall, but all portion of the wall above the roof solid would be
# subtracted as well.
#
#
# FC forum discussion : Sketch based Arch_Roof and wall substraction
# - https://forum.freecad.org/viewtopic.php?t=84389
#
#
faces = []
solids = []
for f in obj.Base.Shape.Faces: # obj.Base.Shape.Solids.Faces
Expand Down
4 changes: 2 additions & 2 deletions src/Mod/BIM/ArchSpace.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def setProperties(self,obj):
if not "Boundaries" in pl:
obj.addProperty("App::PropertyLinkSubList","Boundaries", "Space",QT_TRANSLATE_NOOP("App::Property","The objects that make the boundaries of this space object"))
if not "Area" in pl:
obj.addProperty("App::PropertyArea", "Area", "Space",QT_TRANSLATE_NOOP("App::Property","Identical to Horizontal Area"))
obj.addProperty("App::PropertyArea", "Area", "Space",QT_TRANSLATE_NOOP("App::Property","Identical to Horizontal Area"))
if not "FinishFloor" in pl:
obj.addProperty("App::PropertyString", "FinishFloor", "Space",QT_TRANSLATE_NOOP("App::Property","The finishing of the floor of this space"))
if not "FinishWalls" in pl:
Expand All @@ -245,7 +245,7 @@ def setProperties(self,obj):
obj.addProperty("App::PropertyEnumeration","Conditioning", "Space",QT_TRANSLATE_NOOP("App::Property","The type of air conditioning of this space"))
obj.Conditioning = ConditioningTypes
if not "Internal" in pl:
obj.addProperty("App::PropertyBool", "Internal", "Space",QT_TRANSLATE_NOOP("App::Property","Specifies if this space is internal or external"))
obj.addProperty("App::PropertyBool", "Internal", "Space",QT_TRANSLATE_NOOP("App::Property","Specifies if this space is internal or external"))
obj.Internal = True
if not "AreaCalculationType" in pl:
obj.addProperty("App::PropertyEnumeration", "AreaCalculationType", "Space",QT_TRANSLATE_NOOP("App::Property","Defines the calculation type for the horizontal area and its perimeter length"))
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/BIM/Resources/create_qrc.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
txt += " </qresource>\n</RCC>\n"
with open(os.path.join(cdir, "Arch.qrc"), "w") as resfile:
resfile.write(txt)

14 changes: 7 additions & 7 deletions src/Mod/BIM/bimcommands/BimArchUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def Activated(self):

class Arch_Remove:
"the Arch Add command definition"

def GetResources(self):
return {'Pixmap' : 'Arch_Remove',
'MenuText': QT_TRANSLATE_NOOP("Arch_Remove","Remove component"),
Expand Down Expand Up @@ -110,7 +110,7 @@ def Activated(self):

class Arch_SplitMesh:
"the Arch SplitMesh command definition"

def GetResources(self):
return {'Pixmap' : 'Arch_SplitMesh',
'MenuText': QT_TRANSLATE_NOOP("Arch_SplitMesh","Split Mesh"),
Expand Down Expand Up @@ -138,7 +138,7 @@ def Activated(self):

class Arch_MeshToShape:
"the Arch MeshToShape command definition"

def GetResources(self):
return {'Pixmap' : 'Arch_MeshToShape',
'MenuText': QT_TRANSLATE_NOOP("Arch_MeshToShape","Mesh to Shape"),
Expand Down Expand Up @@ -302,7 +302,7 @@ def Activated(self):

class Arch_Component:
"the Arch Component command definition"

def GetResources(self):
return {'Pixmap' : 'Arch_Component',
'MenuText': QT_TRANSLATE_NOOP("Arch_Component","Component"),
Expand All @@ -329,7 +329,7 @@ def Activated(self):

class Arch_CloneComponent:
"the Arch Clone Component command definition"

def GetResources(self):
return {'Pixmap' : 'Arch_Component_Clone',
'MenuText': QT_TRANSLATE_NOOP("Arch_CloneComponent","Clone component"),
Expand All @@ -356,7 +356,7 @@ def Activated(self):

class Arch_IfcSpreadsheet:
"the Arch Schedule command definition"

def GetResources(self):
return {'Pixmap': 'Arch_Schedule',
'MenuText': QT_TRANSLATE_NOOP("Arch_IfcSpreadsheet","Create IFC spreadsheet..."),
Expand All @@ -383,7 +383,7 @@ def Activated(self):

class Arch_ToggleSubs:
"the ToggleSubs command definition"

def GetResources(self):
return {'Pixmap' : 'Arch_ToggleSubs',
'Accel' : 'Ctrl+Space',
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/BIM/bimcommands/BimBeam.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@


class BIM_Beam(ArchStructure._CommandStructure):

def __init__(self):
super().__init__()
self.beammode = True
Expand Down
4 changes: 2 additions & 2 deletions src/Mod/BIM/bimcommands/BimClassification.py
Original file line number Diff line number Diff line change
Expand Up @@ -629,10 +629,10 @@ def onDownArrow(self):

def getIcon(self,obj):
"""returns a QIcon for an object"""

from PySide import QtCore, QtGui
import Arch_rc

if hasattr(obj.ViewObject, "Icon"):
return obj.ViewObject.Icon
elif hasattr(obj.ViewObject, "Proxy") and hasattr(obj.ViewObject.Proxy, "getIcon"):
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/BIM/bimcommands/BimEquipment.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def Activated(self):


class Arch_3Views:

# OBSOLETE

"the Arch 3Views command definition"
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/BIM/bimcommands/BimPipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def Activated(self):
FreeCADGui.doCommand("Draft.autogroup(obj)")
FreeCAD.ActiveDocument.commitTransaction()
FreeCAD.ActiveDocument.recompute()


class Arch_PipeGroupCommand:

Expand Down
2 changes: 1 addition & 1 deletion src/Mod/BIM/bimcommands/BimProject.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def GetResources(self):
return {
"Pixmap": "BIM_Project",
"MenuText": QT_TRANSLATE_NOOP("BIM_Project", "Project"),
"ToolTip": QT_TRANSLATE_NOOP("BIM_Project",
"ToolTip": QT_TRANSLATE_NOOP("BIM_Project",
"Create an empty NativeIFC project"),
}

Expand Down
2 changes: 1 addition & 1 deletion src/Mod/BIM/bimcommands/BimRebar.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,6 @@ def Activated(self):
FreeCADGui.Control.showDialog(ArchComponent.SelectionTaskPanel())
FreeCAD.ArchObserver = ArchComponent.ArchSelectionObserver(nextCommand="Arch_Rebar")
FreeCADGui.Selection.addObserver(FreeCAD.ArchObserver)


FreeCADGui.addCommand('Arch_Rebar',Arch_Rebar())
2 changes: 1 addition & 1 deletion src/Mod/BIM/bimcommands/BimSectionPlane.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def Activated(self):
FreeCADGui.doCommand("section = Arch.makeSectionPlane("+ss+")")
FreeCAD.ActiveDocument.commitTransaction()
FreeCAD.ActiveDocument.recompute()



FreeCADGui.addCommand('Arch_SectionPlane', Arch_SectionPlane())
2 changes: 1 addition & 1 deletion src/Mod/BIM/bimcommands/BimTogglePanels.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def Activated(self):
if togglebutton:
togglebutton.setChecked(False)
else:
widgets = PARAMS.GetString("HiddenWidgets",
widgets = PARAMS.GetString("HiddenWidgets",
"Python console;;Report view;;Selection view;;"
)
widgets = [mw.findChild(QtGui.QWidget, w) for w in widgets.split(";;") if w]
Expand Down
4 changes: 2 additions & 2 deletions src/Mod/BIM/bimcommands/BimTruss.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def getPoint(self,point=None,obj=None):
self.createTruss()

def createTruss(self, basename=""):

"""Creates the truss"""

FreeCADGui.Control.closeDialog()
Expand All @@ -96,6 +96,6 @@ def createTruss(self, basename=""):
FreeCADGui.doCommand("Draft.autogroup(obj)")
FreeCAD.ActiveDocument.commitTransaction()
FreeCAD.ActiveDocument.recompute()


FreeCADGui.addCommand('Arch_Truss', Arch_Truss())
8 changes: 4 additions & 4 deletions src/Mod/BIM/bimcommands/BimViews.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def Activated(self):
self.dialog = FreeCADGui.PySideUic.loadUi(":/ui/dialogViews.ui")
vm.setWidget(self.dialog)
vm.tree = self.dialog.tree

# set context menu
self.dialog.tree.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)

Expand Down Expand Up @@ -252,7 +252,7 @@ def update(self, retrigger=True):
sortLvItems = [item[0] for item in sortLvHold]
treeViewItems = treeViewItems + sortLvItems + soloProxyHold
vm.tree.addTopLevelItems(treeViewItems)

# add views
ficon = QtGui.QIcon.fromTheme("folder", QtGui.QIcon(":/icons/folder.svg"))
views = self.getViews()
Expand Down Expand Up @@ -445,10 +445,10 @@ def getViews(self):
if getattr(v, "Source", None):
views.append(v.Source)
return views

def getPages(self):
"""Returns a list of TD pages"""
return [o for o in FreeCAD.ActiveDocument.Objects if o.isDerivedFrom('TechDraw::DrawPage')]
return [o for o in FreeCAD.ActiveDocument.Objects if o.isDerivedFrom('TechDraw::DrawPage')]


# These functions need to be localized outside the command class, as they are used outside this module
Expand Down
4 changes: 2 additions & 2 deletions src/Mod/BIM/nativeifc/ifc_openshell.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ def compare_versions(self, v1, v2):

# code from https://www.geeksforgeeks.org/compare-two-version-numbers

arr1 = v1.replace("v","").split(".")
arr2 = v2.replace("v","").split(".")
arr1 = v1.replace("v","").split(".")
arr2 = v2.replace("v","").split(".")
n = len(arr1)
m = len(arr2)
arr1 = [int(i) for i in arr1]
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/BIM/nativeifc/ifc_selftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"""
unit tests for the NativeIFC functionality. To run the tests, either:
- in terminal mode: FreeCAD -t ifc_selftest
- in the FreeCAD UI: Switch to Test Framework workbench, press "Self test" and
- in the FreeCAD UI: Switch to Test Framework workbench, press "Self test" and
choose ifc_selftest in the list
"""

Expand Down
2 changes: 1 addition & 1 deletion src/Mod/BIM/utils/convertPsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# * *
# ***************************************************************************

"""This script converts a xml file containing pset definitions to a csv file.
"""This script converts a xml file containing pset definitions to a csv file.
Python3 only!! (py2 csv doesn't support utf8"""

import xml.sax, os
Expand Down

0 comments on commit 25e8aac

Please sign in to comment.