Bug#1117850: freecad: CAM output fail with fanuc postprocessor ('FeaturePython' object has no attribute 'ToolType')

Petter Reinholdtsen pere at hungry.com
Sat Nov 29 19:51:19 GMT 2025


Control: tags -1 + patch
Control: forwarded -1 https://github.com/FreeCAD/FreeCAD/issues/25723

Using the following patch I was able to get FreeCAD version 1.0.0+dfsg-8
in Debian Stable / Trixie working.

I am submitting patches upstream to ensure this is fixed there too.

--- /usr/lib/freecad/Mod/CAM/Path/Post/scripts/fanuc_post.py    2024-11-18 17:48:00.000000000 +0100
+++ /usr/lib/freecad/Mod/CAM/Path/Post/scripts/fanuc_test_post.py       2025-11-29 20:43:18.052877155 +0100
@@ -417,7 +417,7 @@
 
             # if it's a tap, we rigid tap, so don't start the spindle yet...
             if command == "M03" or command == "M3":
-                if pathobj.Tool.ToolType == "Tap":
+                if hasattr(pathobj, "Tool") and pathobj.Tool.ShapeName.lower() == "tap":
                     tapSpeed = int(pathobj.SpindleSpeed)
                     continue
 
@@ -425,7 +425,7 @@
             if command == "G81" or command == "G83":
                 if (
                     hasattr(pathobj, "ToolController")
-                    and pathobj.ToolController.Tool.ToolType == "Tap"
+                    and pathobj.ToolController.Tool.ShapeName.lower() == "tap"
                 ):
                     command = "G84"
                     out += linenumber() + "G95\n"

-- 
Happy hacking
Petter Reinholdtsen



More information about the debian-science-maintainers mailing list