Skip to content

Commit c27bc39

Browse files
committed
check_version.py: Add the MagnetHoleChamfer property for v0.11.9 migration.
MagnetHoleChamfer is needed for baseplates with magnet holes since v0.11.9.
1 parent fcbff39 commit c27bc39

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

freecad/gridfinity_workbench/check_version.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,17 @@ def migrate_object_version(obj: fc.DocumentObject) -> None: # noqa: C901
2727

2828
### v0.11.9 Changes ###
2929

30+
if (hasattr(obj, "Baseplate") and
31+
hasattr(obj, "MagnetHoles") and
32+
not hasattr(obj, "MagnetHoleChamfer")):
33+
# Add property for the magnet hole chamfer.
34+
obj.addProperty(
35+
"App::PropertyLength",
36+
"MagnetHoleChamfer",
37+
"GridfinityNonStandard",
38+
"The depth at which magnet hole chamfer starts.",
39+
).MagnetHoleChamfer = 0.25
40+
3041
if hasattr(obj, "MagnetHoles"):
3142
# Add properties for the crush ribs to hold magnets.
3243
if not hasattr(obj, "CrushRibsCount"):

0 commit comments

Comments
 (0)