From f7e8daf69f0dc7e37b2ee341402d52925cf4dbcd Mon Sep 17 00:00:00 2001 From: Rahix Date: Sun, 9 Aug 2026 22:58:37 +0200 Subject: [PATCH 1/4] RoofBridge, Teardrop: Order UI elements in file like on screen Order the rows in increasing order so the layout in the source file for the panel matches the layout on screen. This makes manual edits much easier. --- Resources/panels/ffDesign_RoofBridge.ui | 46 ++++++++++++------------- Resources/panels/ffDesign_Teardrop.ui | 12 +++---- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/Resources/panels/ffDesign_RoofBridge.ui b/Resources/panels/ffDesign_RoofBridge.ui index 4257178..a0fe3ea 100644 --- a/Resources/panels/ffDesign_RoofBridge.ui +++ b/Resources/panels/ffDesign_RoofBridge.ui @@ -14,26 +14,6 @@ Roof Bridge - - - - Bridge Clearance - - - - - - - mm - - - 0.000000000000000 - - - Amount of additional clearance to add beneath the bridge to account for filament drooping. - - - @@ -54,6 +34,13 @@ + + + + 60° Overhang Angle + + + @@ -61,10 +48,23 @@ - - + + - 60° Overhang Angle + Bridge Clearance + + + + + + + mm + + + 0.000000000000000 + + + Amount of additional clearance to add beneath the bridge to account for filament drooping. diff --git a/Resources/panels/ffDesign_Teardrop.ui b/Resources/panels/ffDesign_Teardrop.ui index e9c34a7..298befe 100644 --- a/Resources/panels/ffDesign_Teardrop.ui +++ b/Resources/panels/ffDesign_Teardrop.ui @@ -14,17 +14,17 @@ Teardrop - - + + - 120° Teardrop Angle + 90° Teardrop Angle - - + + - 90° Teardrop Angle + 120° Teardrop Angle From 570f717047ffebb5f4ac29438f5779d5fd66be99 Mon Sep 17 00:00:00 2001 From: Rahix Date: Sun, 9 Aug 2026 23:09:46 +0200 Subject: [PATCH 2/4] Teardrop: Reformat source file --- ffDesign_Teardrop.py | 36 +++++++++--------------------------- 1 file changed, 9 insertions(+), 27 deletions(-) diff --git a/ffDesign_Teardrop.py b/ffDesign_Teardrop.py index 1d25542..7b6f604 100644 --- a/ffDesign_Teardrop.py +++ b/ffDesign_Teardrop.py @@ -45,9 +45,7 @@ def _single_tear( Sketcher.Constraint("DistanceX", last_geo_id + 0, 3, 0), Sketcher.Constraint("DistanceY", last_geo_id + 0, 3, 0), Sketcher.Constraint("Diameter", last_geo_id + 0, 2), - Sketcher.Constraint( - "Angle", last_geo_id + 1, 2, last_geo_id + 2, 2, math.pi / 2 - ), + Sketcher.Constraint("Angle", last_geo_id + 1, 2, last_geo_id + 2, 2, math.pi / 2), Sketcher.Constraint("Angle", last_geo_id + 3, math.pi / 2), ] sketch.addConstraint(new_constraints) @@ -71,9 +69,7 @@ def make_parametric_teardrop( ): Utils.assert_sketch(sketch) - last_geo_id, last_c = _single_tear( - sketch, hole_loc, diameter_expr, angle_expr, rotation_expr - ) + last_geo_id, last_c = _single_tear(sketch, hole_loc, diameter_expr, angle_expr, rotation_expr) if double_sided: last_geo_id2, last_c2 = _single_tear( sketch, hole_loc, diameter_expr, angle_expr, f"({rotation_expr}) + 180 deg" @@ -106,23 +102,17 @@ def make_teardrops( assert rotation.Unit.Type == "Angle" if "TeardropAngle" not in hole.PropertiesList: - hole.addProperty( - "App::PropertyAngle", "TeardropAngle", group="FusedFilamentDesign" - ) + hole.addProperty("App::PropertyAngle", "TeardropAngle", group="FusedFilamentDesign") hole.TeardropAngle = angle if "TeardropRotation" not in hole.PropertiesList: - hole.addProperty( - "App::PropertyAngle", "TeardropRotation", group="FusedFilamentDesign" - ) + hole.addProperty("App::PropertyAngle", "TeardropRotation", group="FusedFilamentDesign") hole.TeardropRotation = rotation profile_sketch = Utils.get_hole_profile_sketch(hole) teardrop_sketch = Utils.make_derived_sketch(body, profile_sketch, "_Teardrops") - hole_locations = Utils.get_sketch_locations( - profile_sketch, Utils.get_hole_profile_type(hole) - ) + hole_locations = Utils.get_sketch_locations(profile_sketch, Utils.get_hole_profile_type(hole)) for hole_loc in hole_locations: make_parametric_teardrop( teardrop_sketch, @@ -146,9 +136,7 @@ def make_teardrops( if not do_counterbore or not Utils.hole_has_counterbore_maybe(hole): return - teardrops_cb_sketch = Utils.make_derived_sketch( - body, profile_sketch, "_TeardropsCb" - ) + teardrops_cb_sketch = Utils.make_derived_sketch(body, profile_sketch, "_TeardropsCb") for hole_loc in hole_locations: make_parametric_teardrop( @@ -177,9 +165,7 @@ def __init__(self, body, hole): self.body = body self.hole = hole - self.form = Gui.PySideUic.loadUi( - Utils.Resources.get_panel("ffDesign_Teardrop.ui") - ) + self.form = Gui.PySideUic.loadUi(Utils.Resources.get_panel("ffDesign_Teardrop.ui")) # Default is 120° teardrop angle self.form.Angle120.toggle() @@ -192,12 +178,8 @@ def accept(self): elif self.form.Angle120.isChecked(): angle = "120 deg" - do_counterbore = ( - self.form.DoCounterbore.checkState() == QtCore.Qt.CheckState.Checked - ) - double_sided = ( - self.form.DoubleSided.checkState() == QtCore.Qt.CheckState.Checked - ) + do_counterbore = self.form.DoCounterbore.checkState() == QtCore.Qt.CheckState.Checked + double_sided = self.form.DoubleSided.checkState() == QtCore.Qt.CheckState.Checked Gui.Control.closeDialog() From b8262d6b0d1a9642b61299db7cc3f62fe54bae30 Mon Sep 17 00:00:00 2001 From: Rahix Date: Sun, 9 Aug 2026 23:11:33 +0200 Subject: [PATCH 3/4] Teardrop: Add rotation to the task panel You can now set the rotation as part of the teardrop task panel. Previously, it was only available on the original `PartDesign_Hole` as a non-obvious property in the data panel. --- Resources/panels/ffDesign_Teardrop.ui | 25 +++++++++++++++++++++---- ffDesign_Teardrop.py | 6 +++++- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/Resources/panels/ffDesign_Teardrop.ui b/Resources/panels/ffDesign_Teardrop.ui index 298befe..43a99d3 100644 --- a/Resources/panels/ffDesign_Teardrop.ui +++ b/Resources/panels/ffDesign_Teardrop.ui @@ -14,21 +14,21 @@ Teardrop - + 90° Teardrop Angle - + 120° Teardrop Angle - + Also add a Teardrop shape to the counterbore of this hole. @@ -38,7 +38,7 @@ - + Make the Teardrop shape double sided (symmetric). @@ -48,6 +48,23 @@ + + + + Rotation + + + + + + + deg + + + Direction of the teardrop around the hole axis. + + + diff --git a/ffDesign_Teardrop.py b/ffDesign_Teardrop.py index 7b6f604..7076059 100644 --- a/ffDesign_Teardrop.py +++ b/ffDesign_Teardrop.py @@ -170,6 +170,9 @@ def __init__(self, body, hole): # Default is 120° teardrop angle self.form.Angle120.toggle() + # 90° means "up" in the sketch plane, usually + self.form.TeardropRotation.setProperty("rawValue", 90) + def accept(self): try: angle = "120 deg" @@ -180,6 +183,7 @@ def accept(self): do_counterbore = self.form.DoCounterbore.checkState() == QtCore.Qt.CheckState.Checked double_sided = self.form.DoubleSided.checkState() == QtCore.Qt.CheckState.Checked + rotation = self.form.TeardropRotation.property("value") Gui.Control.closeDialog() @@ -189,7 +193,7 @@ def accept(self): self.body, self.hole, angle=angle, - rotation="90 deg", + rotation=rotation, do_counterbore=do_counterbore, double_sided=double_sided, ) From 7146dd0651cfe645d5a4fb2bc8b482c089c1f269 Mon Sep 17 00:00:00 2001 From: Rahix Date: Sun, 9 Aug 2026 23:17:31 +0200 Subject: [PATCH 4/4] RoofBridge: Add rotation to the task panel You can now set the rotation as part of the roof bridge task panel. Previously, it was only available on the original `PartDesign_Hole` as a non-obvious property in the data panel. --- Resources/panels/ffDesign_RoofBridge.ui | 17 +++++++++++++++++ ffDesign_RoofBridge.py | 6 +++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/Resources/panels/ffDesign_RoofBridge.ui b/Resources/panels/ffDesign_RoofBridge.ui index a0fe3ea..62297ee 100644 --- a/Resources/panels/ffDesign_RoofBridge.ui +++ b/Resources/panels/ffDesign_RoofBridge.ui @@ -68,6 +68,23 @@ + + + + Rotation + + + + + + + deg + + + Direction of the roof bridge around the hole axis. + + + diff --git a/ffDesign_RoofBridge.py b/ffDesign_RoofBridge.py index b292fa3..1b8f328 100644 --- a/ffDesign_RoofBridge.py +++ b/ffDesign_RoofBridge.py @@ -213,6 +213,9 @@ def __init__(self, body, hole): # Default is 45° overhang angle self.form.Angle45.toggle() + # 90° means "up" in the sketch plane, usually + self.form.BridgeRotation.setProperty("rawValue", 90) + def accept(self): try: angle = "45 deg" @@ -224,6 +227,7 @@ def accept(self): do_counterbore = self.form.DoCounterbore.checkState() == QtCore.Qt.CheckState.Checked do_doublesided = self.form.DoubleSided.checkState() == QtCore.Qt.CheckState.Checked bridge_clearance = self.form.BridgeClearance.property("value") + bridge_rotation = self.form.BridgeRotation.property("value") Gui.Control.closeDialog() @@ -233,7 +237,7 @@ def accept(self): self.body, self.hole, angle=angle, - rotation="90 deg", + rotation=bridge_rotation, do_counterbore=do_counterbore, do_doublesided=do_doublesided, bridge_clearance=bridge_clearance,