BIM: Trim trailing newlines
This commit is contained in:
@@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
|
|||||||
## Enforcement
|
## Enforcement
|
||||||
|
|
||||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
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
|
https://forum.freecad.org/memberlist.php?mode=team . All
|
||||||
complaints will be reviewed and investigated and will result in a response that
|
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
|
is deemed necessary and appropriate to the circumstances. The project team is
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# FreeCAD Privacy Policy
|
# FreeCAD Privacy Policy
|
||||||
|
|
||||||
The FreeCAD application does not collect, transmit, share or use any Personal Data.
|
The FreeCAD application does not collect, transmit, share or use any Personal Data.
|
||||||
|
|
||||||
@@ -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.
|
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)
|
- [based on the GIMP privacy policy](https://www.gimp.org/about/privacy.html)
|
||||||
|
|
||||||
|
|||||||
@@ -300,7 +300,7 @@ class BuildingPart(ArchIFC.IfcProduct):
|
|||||||
def execute(self,obj):
|
def execute(self,obj):
|
||||||
|
|
||||||
"gather all the child shapes into a compound"
|
"gather all the child shapes into a compound"
|
||||||
|
|
||||||
pl = obj.Placement
|
pl = obj.Placement
|
||||||
shapes,materialstable = self.getShapes(obj)
|
shapes,materialstable = self.getShapes(obj)
|
||||||
if shapes:
|
if shapes:
|
||||||
@@ -323,7 +323,7 @@ class BuildingPart(ArchIFC.IfcProduct):
|
|||||||
obj.ViewObject.Proxy.onChanged(obj.ViewObject,"AutoGroupBox")
|
obj.ViewObject.Proxy.onChanged(obj.ViewObject,"AutoGroupBox")
|
||||||
|
|
||||||
def getMovableChildren(self, obj):
|
def getMovableChildren(self, obj):
|
||||||
|
|
||||||
"recursively get movable children"
|
"recursively get movable children"
|
||||||
|
|
||||||
result = []
|
result = []
|
||||||
|
|||||||
@@ -744,10 +744,10 @@ class _Roof(ArchComponent.Component):
|
|||||||
# Not only the solid of the base object itself be subtracted from
|
# 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
|
# a Wall, but all portion of the wall above the roof solid would be
|
||||||
# subtracted as well.
|
# subtracted as well.
|
||||||
#
|
#
|
||||||
# FC forum discussion : Sketch based Arch_Roof and wall substraction
|
# FC forum discussion : Sketch based Arch_Roof and wall substraction
|
||||||
# - https://forum.freecad.org/viewtopic.php?t=84389
|
# - https://forum.freecad.org/viewtopic.php?t=84389
|
||||||
#
|
#
|
||||||
faces = []
|
faces = []
|
||||||
solids = []
|
solids = []
|
||||||
for f in obj.Base.Shape.Faces: # obj.Base.Shape.Solids.Faces
|
for f in obj.Base.Shape.Faces: # obj.Base.Shape.Solids.Faces
|
||||||
|
|||||||
@@ -219,7 +219,7 @@ class _Space(ArchComponent.Component):
|
|||||||
if not "Boundaries" in pl:
|
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"))
|
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:
|
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:
|
if not "FinishFloor" in pl:
|
||||||
obj.addProperty("App::PropertyString", "FinishFloor", "Space",QT_TRANSLATE_NOOP("App::Property","The finishing of the floor of this space"))
|
obj.addProperty("App::PropertyString", "FinishFloor", "Space",QT_TRANSLATE_NOOP("App::Property","The finishing of the floor of this space"))
|
||||||
if not "FinishWalls" in pl:
|
if not "FinishWalls" in pl:
|
||||||
@@ -245,7 +245,7 @@ class _Space(ArchComponent.Component):
|
|||||||
obj.addProperty("App::PropertyEnumeration","Conditioning", "Space",QT_TRANSLATE_NOOP("App::Property","The type of air conditioning of this space"))
|
obj.addProperty("App::PropertyEnumeration","Conditioning", "Space",QT_TRANSLATE_NOOP("App::Property","The type of air conditioning of this space"))
|
||||||
obj.Conditioning = ConditioningTypes
|
obj.Conditioning = ConditioningTypes
|
||||||
if not "Internal" in pl:
|
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
|
obj.Internal = True
|
||||||
if not "AreaCalculationType" in pl:
|
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"))
|
obj.addProperty("App::PropertyEnumeration", "AreaCalculationType", "Space",QT_TRANSLATE_NOOP("App::Property","Defines the calculation type for the horizontal area and its perimeter length"))
|
||||||
|
|||||||
@@ -13,4 +13,4 @@ for subdir in ["icons", "ui", "translations"]:
|
|||||||
txt += " </qresource>\n</RCC>\n"
|
txt += " </qresource>\n</RCC>\n"
|
||||||
with open(os.path.join(cdir, "Arch.qrc"), "w") as resfile:
|
with open(os.path.join(cdir, "Arch.qrc"), "w") as resfile:
|
||||||
resfile.write(txt)
|
resfile.write(txt)
|
||||||
|
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ class Arch_Add:
|
|||||||
|
|
||||||
class Arch_Remove:
|
class Arch_Remove:
|
||||||
"the Arch Add command definition"
|
"the Arch Add command definition"
|
||||||
|
|
||||||
def GetResources(self):
|
def GetResources(self):
|
||||||
return {'Pixmap' : 'Arch_Remove',
|
return {'Pixmap' : 'Arch_Remove',
|
||||||
'MenuText': QT_TRANSLATE_NOOP("Arch_Remove","Remove component"),
|
'MenuText': QT_TRANSLATE_NOOP("Arch_Remove","Remove component"),
|
||||||
@@ -110,7 +110,7 @@ class Arch_Remove:
|
|||||||
|
|
||||||
class Arch_SplitMesh:
|
class Arch_SplitMesh:
|
||||||
"the Arch SplitMesh command definition"
|
"the Arch SplitMesh command definition"
|
||||||
|
|
||||||
def GetResources(self):
|
def GetResources(self):
|
||||||
return {'Pixmap' : 'Arch_SplitMesh',
|
return {'Pixmap' : 'Arch_SplitMesh',
|
||||||
'MenuText': QT_TRANSLATE_NOOP("Arch_SplitMesh","Split Mesh"),
|
'MenuText': QT_TRANSLATE_NOOP("Arch_SplitMesh","Split Mesh"),
|
||||||
@@ -138,7 +138,7 @@ class Arch_SplitMesh:
|
|||||||
|
|
||||||
class Arch_MeshToShape:
|
class Arch_MeshToShape:
|
||||||
"the Arch MeshToShape command definition"
|
"the Arch MeshToShape command definition"
|
||||||
|
|
||||||
def GetResources(self):
|
def GetResources(self):
|
||||||
return {'Pixmap' : 'Arch_MeshToShape',
|
return {'Pixmap' : 'Arch_MeshToShape',
|
||||||
'MenuText': QT_TRANSLATE_NOOP("Arch_MeshToShape","Mesh to Shape"),
|
'MenuText': QT_TRANSLATE_NOOP("Arch_MeshToShape","Mesh to Shape"),
|
||||||
@@ -302,7 +302,7 @@ class Arch_ToggleIfcBrepFlag:
|
|||||||
|
|
||||||
class Arch_Component:
|
class Arch_Component:
|
||||||
"the Arch Component command definition"
|
"the Arch Component command definition"
|
||||||
|
|
||||||
def GetResources(self):
|
def GetResources(self):
|
||||||
return {'Pixmap' : 'Arch_Component',
|
return {'Pixmap' : 'Arch_Component',
|
||||||
'MenuText': QT_TRANSLATE_NOOP("Arch_Component","Component"),
|
'MenuText': QT_TRANSLATE_NOOP("Arch_Component","Component"),
|
||||||
@@ -329,7 +329,7 @@ class Arch_Component:
|
|||||||
|
|
||||||
class Arch_CloneComponent:
|
class Arch_CloneComponent:
|
||||||
"the Arch Clone Component command definition"
|
"the Arch Clone Component command definition"
|
||||||
|
|
||||||
def GetResources(self):
|
def GetResources(self):
|
||||||
return {'Pixmap' : 'Arch_Component_Clone',
|
return {'Pixmap' : 'Arch_Component_Clone',
|
||||||
'MenuText': QT_TRANSLATE_NOOP("Arch_CloneComponent","Clone component"),
|
'MenuText': QT_TRANSLATE_NOOP("Arch_CloneComponent","Clone component"),
|
||||||
@@ -356,7 +356,7 @@ class Arch_CloneComponent:
|
|||||||
|
|
||||||
class Arch_IfcSpreadsheet:
|
class Arch_IfcSpreadsheet:
|
||||||
"the Arch Schedule command definition"
|
"the Arch Schedule command definition"
|
||||||
|
|
||||||
def GetResources(self):
|
def GetResources(self):
|
||||||
return {'Pixmap': 'Arch_Schedule',
|
return {'Pixmap': 'Arch_Schedule',
|
||||||
'MenuText': QT_TRANSLATE_NOOP("Arch_IfcSpreadsheet","Create IFC spreadsheet..."),
|
'MenuText': QT_TRANSLATE_NOOP("Arch_IfcSpreadsheet","Create IFC spreadsheet..."),
|
||||||
@@ -383,7 +383,7 @@ class Arch_IfcSpreadsheet:
|
|||||||
|
|
||||||
class Arch_ToggleSubs:
|
class Arch_ToggleSubs:
|
||||||
"the ToggleSubs command definition"
|
"the ToggleSubs command definition"
|
||||||
|
|
||||||
def GetResources(self):
|
def GetResources(self):
|
||||||
return {'Pixmap' : 'Arch_ToggleSubs',
|
return {'Pixmap' : 'Arch_ToggleSubs',
|
||||||
'Accel' : 'Ctrl+Space',
|
'Accel' : 'Ctrl+Space',
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ QT_TRANSLATE_NOOP = FreeCAD.Qt.QT_TRANSLATE_NOOP
|
|||||||
|
|
||||||
|
|
||||||
class BIM_Beam(ArchStructure._CommandStructure):
|
class BIM_Beam(ArchStructure._CommandStructure):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.beammode = True
|
self.beammode = True
|
||||||
|
|||||||
@@ -629,10 +629,10 @@ class BIM_Classification:
|
|||||||
|
|
||||||
def getIcon(self,obj):
|
def getIcon(self,obj):
|
||||||
"""returns a QIcon for an object"""
|
"""returns a QIcon for an object"""
|
||||||
|
|
||||||
from PySide import QtCore, QtGui
|
from PySide import QtCore, QtGui
|
||||||
import Arch_rc
|
import Arch_rc
|
||||||
|
|
||||||
if hasattr(obj.ViewObject, "Icon"):
|
if hasattr(obj.ViewObject, "Icon"):
|
||||||
return obj.ViewObject.Icon
|
return obj.ViewObject.Icon
|
||||||
elif hasattr(obj.ViewObject, "Proxy") and hasattr(obj.ViewObject.Proxy, "getIcon"):
|
elif hasattr(obj.ViewObject, "Proxy") and hasattr(obj.ViewObject.Proxy, "getIcon"):
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ class Arch_Equipment:
|
|||||||
|
|
||||||
|
|
||||||
class Arch_3Views:
|
class Arch_3Views:
|
||||||
|
|
||||||
# OBSOLETE
|
# OBSOLETE
|
||||||
|
|
||||||
"the Arch 3Views command definition"
|
"the Arch 3Views command definition"
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ class Arch_PipeConnector:
|
|||||||
FreeCADGui.doCommand("Draft.autogroup(obj)")
|
FreeCADGui.doCommand("Draft.autogroup(obj)")
|
||||||
FreeCAD.ActiveDocument.commitTransaction()
|
FreeCAD.ActiveDocument.commitTransaction()
|
||||||
FreeCAD.ActiveDocument.recompute()
|
FreeCAD.ActiveDocument.recompute()
|
||||||
|
|
||||||
|
|
||||||
class Arch_PipeGroupCommand:
|
class Arch_PipeGroupCommand:
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ class BIM_Project:
|
|||||||
return {
|
return {
|
||||||
"Pixmap": "BIM_Project",
|
"Pixmap": "BIM_Project",
|
||||||
"MenuText": QT_TRANSLATE_NOOP("BIM_Project", "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"),
|
"Create an empty NativeIFC project"),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -94,6 +94,6 @@ class Arch_Rebar:
|
|||||||
FreeCADGui.Control.showDialog(ArchComponent.SelectionTaskPanel())
|
FreeCADGui.Control.showDialog(ArchComponent.SelectionTaskPanel())
|
||||||
FreeCAD.ArchObserver = ArchComponent.ArchSelectionObserver(nextCommand="Arch_Rebar")
|
FreeCAD.ArchObserver = ArchComponent.ArchSelectionObserver(nextCommand="Arch_Rebar")
|
||||||
FreeCADGui.Selection.addObserver(FreeCAD.ArchObserver)
|
FreeCADGui.Selection.addObserver(FreeCAD.ArchObserver)
|
||||||
|
|
||||||
|
|
||||||
FreeCADGui.addCommand('Arch_Rebar',Arch_Rebar())
|
FreeCADGui.addCommand('Arch_Rebar',Arch_Rebar())
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ class Arch_SectionPlane:
|
|||||||
FreeCADGui.doCommand("section = Arch.makeSectionPlane("+ss+")")
|
FreeCADGui.doCommand("section = Arch.makeSectionPlane("+ss+")")
|
||||||
FreeCAD.ActiveDocument.commitTransaction()
|
FreeCAD.ActiveDocument.commitTransaction()
|
||||||
FreeCAD.ActiveDocument.recompute()
|
FreeCAD.ActiveDocument.recompute()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
FreeCADGui.addCommand('Arch_SectionPlane', Arch_SectionPlane())
|
FreeCADGui.addCommand('Arch_SectionPlane', Arch_SectionPlane())
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ class BIM_TogglePanels:
|
|||||||
if togglebutton:
|
if togglebutton:
|
||||||
togglebutton.setChecked(False)
|
togglebutton.setChecked(False)
|
||||||
else:
|
else:
|
||||||
widgets = PARAMS.GetString("HiddenWidgets",
|
widgets = PARAMS.GetString("HiddenWidgets",
|
||||||
"Python console;;Report view;;Selection view;;"
|
"Python console;;Report view;;Selection view;;"
|
||||||
)
|
)
|
||||||
widgets = [mw.findChild(QtGui.QWidget, w) for w in widgets.split(";;") if w]
|
widgets = [mw.findChild(QtGui.QWidget, w) for w in widgets.split(";;") if w]
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ class Arch_Truss:
|
|||||||
self.createTruss()
|
self.createTruss()
|
||||||
|
|
||||||
def createTruss(self, basename=""):
|
def createTruss(self, basename=""):
|
||||||
|
|
||||||
"""Creates the truss"""
|
"""Creates the truss"""
|
||||||
|
|
||||||
FreeCADGui.Control.closeDialog()
|
FreeCADGui.Control.closeDialog()
|
||||||
@@ -96,6 +96,6 @@ class Arch_Truss:
|
|||||||
FreeCADGui.doCommand("Draft.autogroup(obj)")
|
FreeCADGui.doCommand("Draft.autogroup(obj)")
|
||||||
FreeCAD.ActiveDocument.commitTransaction()
|
FreeCAD.ActiveDocument.commitTransaction()
|
||||||
FreeCAD.ActiveDocument.recompute()
|
FreeCAD.ActiveDocument.recompute()
|
||||||
|
|
||||||
|
|
||||||
FreeCADGui.addCommand('Arch_Truss', Arch_Truss())
|
FreeCADGui.addCommand('Arch_Truss', Arch_Truss())
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ class BIM_Views:
|
|||||||
self.dialog = FreeCADGui.PySideUic.loadUi(":/ui/dialogViews.ui")
|
self.dialog = FreeCADGui.PySideUic.loadUi(":/ui/dialogViews.ui")
|
||||||
vm.setWidget(self.dialog)
|
vm.setWidget(self.dialog)
|
||||||
vm.tree = self.dialog.tree
|
vm.tree = self.dialog.tree
|
||||||
|
|
||||||
# set context menu
|
# set context menu
|
||||||
self.dialog.tree.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
|
self.dialog.tree.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
|
||||||
|
|
||||||
@@ -252,7 +252,7 @@ class BIM_Views:
|
|||||||
sortLvItems = [item[0] for item in sortLvHold]
|
sortLvItems = [item[0] for item in sortLvHold]
|
||||||
treeViewItems = treeViewItems + sortLvItems + soloProxyHold
|
treeViewItems = treeViewItems + sortLvItems + soloProxyHold
|
||||||
vm.tree.addTopLevelItems(treeViewItems)
|
vm.tree.addTopLevelItems(treeViewItems)
|
||||||
|
|
||||||
# add views
|
# add views
|
||||||
ficon = QtGui.QIcon.fromTheme("folder", QtGui.QIcon(":/icons/folder.svg"))
|
ficon = QtGui.QIcon.fromTheme("folder", QtGui.QIcon(":/icons/folder.svg"))
|
||||||
views = self.getViews()
|
views = self.getViews()
|
||||||
@@ -445,10 +445,10 @@ class BIM_Views:
|
|||||||
if getattr(v, "Source", None):
|
if getattr(v, "Source", None):
|
||||||
views.append(v.Source)
|
views.append(v.Source)
|
||||||
return views
|
return views
|
||||||
|
|
||||||
def getPages(self):
|
def getPages(self):
|
||||||
"""Returns a list of TD pages"""
|
"""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
|
# These functions need to be localized outside the command class, as they are used outside this module
|
||||||
|
|||||||
@@ -164,8 +164,8 @@ class IFC_UpdateIOS:
|
|||||||
|
|
||||||
# code from https://www.geeksforgeeks.org/compare-two-version-numbers
|
# code from https://www.geeksforgeeks.org/compare-two-version-numbers
|
||||||
|
|
||||||
arr1 = v1.replace("v","").split(".")
|
arr1 = v1.replace("v","").split(".")
|
||||||
arr2 = v2.replace("v","").split(".")
|
arr2 = v2.replace("v","").split(".")
|
||||||
n = len(arr1)
|
n = len(arr1)
|
||||||
m = len(arr2)
|
m = len(arr2)
|
||||||
arr1 = [int(i) for i in arr1]
|
arr1 = [int(i) for i in arr1]
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ SDU = int(SINGLEDOC) # number of objects is different in singledoc
|
|||||||
"""
|
"""
|
||||||
unit tests for the NativeIFC functionality. To run the tests, either:
|
unit tests for the NativeIFC functionality. To run the tests, either:
|
||||||
- in terminal mode: FreeCAD -t ifc_selftest
|
- 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
|
choose ifc_selftest in the list
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|||||||
@@ -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"""
|
Python3 only!! (py2 csv doesn't support utf8"""
|
||||||
|
|
||||||
import xml.sax, os
|
import xml.sax, os
|
||||||
|
|||||||
Reference in New Issue
Block a user