diff --git a/src/Mod/BIM/Arch.py b/src/Mod/BIM/Arch.py index f0f2ff3c51..c6b93308ce 100644 --- a/src/Mod/BIM/Arch.py +++ b/src/Mod/BIM/Arch.py @@ -54,7 +54,7 @@ from ArchStructure import * # make functions -def makeAxis(num=5,size=1000,name=None): +def makeAxis(num=1,size=1000,name=None): '''makeAxis([num],[size],[name]): makes an Axis set based on the given number of axes and interval distances''' diff --git a/src/Mod/BIM/ArchBuildingPart.py b/src/Mod/BIM/ArchBuildingPart.py index 4bcea1bcd7..90eec6eb44 100644 --- a/src/Mod/BIM/ArchBuildingPart.py +++ b/src/Mod/BIM/ArchBuildingPart.py @@ -219,7 +219,7 @@ class BuildingPart(ArchIFC.IfcProduct): obj.addProperty("App::PropertyBool","HeightPropagate","Children",QT_TRANSLATE_NOOP("App::Property","If true, the height value propagates to contained objects if the height of those objects is set to 0")) obj.HeightPropagate = True if not "LevelOffset" in pl: - obj.addProperty("App::PropertyLength","LevelOffset","BuildingPart",QT_TRANSLATE_NOOP("App::Property","The level of the (0,0,0) point of this level")) + obj.addProperty("App::PropertyDistance","LevelOffset","BuildingPart",QT_TRANSLATE_NOOP("App::Property","The level of the (0,0,0) point of this level")) if not "Area" in pl: obj.addProperty("App::PropertyArea","Area", "BuildingPart",QT_TRANSLATE_NOOP("App::Property","The computed floor area of this floor")) if not "Description" in pl: diff --git a/src/Mod/BIM/Resources/ui/preferences-arch.ui b/src/Mod/BIM/Resources/ui/preferences-arch.ui index 6c3e20bd21..60d50d378f 100644 --- a/src/Mod/BIM/Resources/ui/preferences-arch.ui +++ b/src/Mod/BIM/Resources/ui/preferences-arch.ui @@ -6,8 +6,8 @@ 0 0 - 446 - 811 + 519 + 954 @@ -26,7 +26,7 @@ Auto-join walls - true + false autoJoinWalls @@ -106,10 +106,10 @@ - By default, new objects will have their "Move with host" property set to False, which means they won't move when their host object is moved. + By default, new objects will have their "Move with host" property set to False, which means they won't move when their host object is moved. - Set "Move with host" property to True by default + Set "Move with host" property to True by default false @@ -125,7 +125,7 @@ - Set "Move base" property to True by default + Set "Move base" property to True by default false @@ -172,6 +172,12 @@ Qt::Horizontal + + + 0 + 0 + + @@ -330,10 +336,10 @@ 4 - 0.0001 + 0.000100000000000 - 0.001 + 0.001000000000000 ConversionTolerance @@ -348,6 +354,12 @@ Qt::Horizontal + + + 0 + 0 + + @@ -388,7 +400,7 @@ Specifies how many times the viewed line thickness must be applied to cut lines - 2.0 + 2.000000000000000 CutLineThickness @@ -403,6 +415,12 @@ Qt::Horizontal + + + 0 + 0 + + @@ -415,7 +433,7 @@ - 0.6 + 0.600000000000000 SymbolLineThickness @@ -471,14 +489,14 @@ a Footprint display mode 4 - - 0.001 - 9999.989999999999782 + + 0.001000000000000 + - 0.01 + 0.010000000000000 patternScale @@ -523,7 +541,7 @@ a Footprint display mode - If this is selected, the "Open BimServer in browser" + If this is selected, the "Open BimServer in browser" button will open the Bim Server interface in an external browser instead of the FreeCAD web workbench @@ -574,6 +592,12 @@ instead of the FreeCAD web workbench Qt::Vertical + + + 0 + 0 + + @@ -582,13 +606,13 @@ instead of the FreeCAD web workbench qPixmapFromMimeSource - Gui::PrefCheckBox - QCheckBox + Gui::PrefSpinBox + QSpinBox
Gui/PrefWidgets.h
- Gui::PrefLineEdit - QLineEdit + Gui::PrefCheckBox + QCheckBox
Gui/PrefWidgets.h
@@ -597,8 +621,8 @@ instead of the FreeCAD web workbench
Gui/PrefWidgets.h
- Gui::PrefSpinBox - QSpinBox + Gui::PrefLineEdit + QLineEdit
Gui/PrefWidgets.h
@@ -614,24 +638,64 @@ instead of the FreeCAD web workbench toggled(bool) checkBox_ConversionFlat setDisabled(bool) + + + 20 + 20 + + + 20 + 20 + + checkBox_ConversionFast toggled(bool) checkBox_ConversionCut setDisabled(bool) + + + 20 + 20 + + + 20 + 20 + + checkBox_ConversionFast toggled(bool) label_ConversionTolerance setDisabled(bool) + + + 20 + 20 + + + 20 + 20 + + checkBox_ConversionFast toggled(bool) spinBox_ConversionTolerance setDisabled(bool) + + + 20 + 20 + + + 20 + 20 + + diff --git a/src/Mod/BIM/bimcommands/BimShape2DView.py b/src/Mod/BIM/bimcommands/BimShape2DView.py index 7ad70600a5..8aed84ee8d 100644 --- a/src/Mod/BIM/bimcommands/BimShape2DView.py +++ b/src/Mod/BIM/bimcommands/BimShape2DView.py @@ -30,6 +30,7 @@ import FreeCADGui from draftguitools import gui_shape2dview QT_TRANSLATE_NOOP = FreeCAD.Qt.QT_TRANSLATE_NOOP +translate = FreeCAD.Qt.translate class BIM_Shape2DView(gui_shape2dview.Shape2DView): @@ -40,5 +41,50 @@ class BIM_Shape2DView(gui_shape2dview.Shape2DView): d["MenuText"] = QT_TRANSLATE_NOOP("BIM_Shape2DView", "Shape-based view") return d + def proceed(self): + """Proceed with the command if one object was selected.""" + # difference from Draft: it sets InPlace to False + import DraftVecUtils + if self.call is not None: + self.end_callbacks(self.call) + faces = [] + objs = [] + view = FreeCADGui.ActiveDocument.ActiveView + vec = view.getViewDirection().negative() + sel = FreeCADGui.Selection.getSelectionEx() + for s in sel: + objs.append(s.Object) + for e in s.SubElementNames: + if "Face" in e: + faces.append(int(e[4:]) - 1) + # print(objs, faces) + commitlist = [] + FreeCADGui.addModule("Draft") + if len(objs) == 1 and faces: + _cmd = "Draft.make_shape2dview" + _cmd += "(" + _cmd += "FreeCAD.ActiveDocument." + objs[0].Name + ", " + _cmd += DraftVecUtils.toString(vec) + ", " + _cmd += "facenumbers=" + str(faces) + _cmd += ")" + commitlist.append("sv = " + _cmd) + commitlist.append("sv.InPlace = False") + else: + n = 0 + for o in objs: + _cmd = "Draft.make_shape2dview" + _cmd += "(" + _cmd += "FreeCAD.ActiveDocument." + o.Name + ", " + _cmd += DraftVecUtils.toString(vec) + _cmd += ")" + commitlist.append("sv" + str(n) + " = " + _cmd) + commitlist.append("sv" + str(n) + ".InPlace = False") + n += 1 + if commitlist: + commitlist.append("FreeCAD.ActiveDocument.recompute()") + self.commit(translate("draft", "Create 2D view"), + commitlist) + self.finish() + FreeCADGui.addCommand("BIM_Shape2DView", BIM_Shape2DView()) diff --git a/src/Mod/BIM/bimcommands/BimSketch.py b/src/Mod/BIM/bimcommands/BimSketch.py index 9a74ba5f5d..81444bdf56 100644 --- a/src/Mod/BIM/bimcommands/BimSketch.py +++ b/src/Mod/BIM/bimcommands/BimSketch.py @@ -50,6 +50,7 @@ class BIM_Sketch: return False def Activated(self): + from draftutils import params issnap = False if hasattr(FreeCAD, "DraftWorkingPlane"): FreeCAD.DraftWorkingPlane.setup() @@ -64,6 +65,9 @@ class BIM_Sketch: sk.ViewObject.GridSize = s sk.ViewObject.GridSnap = True sk.MapMode = "Deactivated" + sk.ViewObject.LineColor = params.get_param_view("DefaultShapeLineColor") + sk.ViewObject.PointColor = params.get_param_view("DefaultShapeLineColor") + sk.ViewObject.LineWidth = params.get_param_view("DefaultShapeLineWidth") p = FreeCAD.DraftWorkingPlane.getPlacement() p.Base = FreeCAD.DraftWorkingPlane.position sk.Placement = p diff --git a/src/Mod/BIM/bimcommands/BimWPCommands.py b/src/Mod/BIM/bimcommands/BimWPCommands.py index 8f4c4f4517..ec993c252d 100644 --- a/src/Mod/BIM/bimcommands/BimWPCommands.py +++ b/src/Mod/BIM/bimcommands/BimWPCommands.py @@ -39,7 +39,7 @@ class BIM_SetWPFront: "ToolTip": QT_TRANSLATE_NOOP( "BIM_SetWPFront", "Set the working plane to Front" ), - "Accel": "Ctrl+Shift+1", + "Accel": "W,P,1", } def Activated(self): @@ -55,7 +55,7 @@ class BIM_SetWPSide: "ToolTip": QT_TRANSLATE_NOOP( "BIM_SetWPSide", "Set the working plane to Side" ), - "Accel": "Ctrl+Shift+3", + "Accel": "W,P,3", } def Activated(self): @@ -71,7 +71,7 @@ class BIM_SetWPTop: "ToolTip": QT_TRANSLATE_NOOP( "BIM_SetWPTop", "Set the working plane to Top" ), - "Accel": "Ctrl+Shift+2", + "Accel": "W,P,2", } def Activated(self):