0.20 regression? Drilling operation fails with a traceback

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
knipknap
Posts: 120
Joined: Sat Mar 05, 2022 1:21 pm

0.20 regression? Drilling operation fails with a traceback

Post by knipknap »

I created a drilling operation with 0.19, and it works nicely:

Screenshot from 2022-03-21 22-56-13.png
Screenshot from 2022-03-21 22-56-13.png (213.9 KiB) Viewed 2117 times

When I open the same file in 0.20 (current daily), it still opens and displays fine, but upon clicking "recompute" on the drilling operation it creates a traceback:

Code: Select all

Traceback (most recent call last):
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathUtils.py", line 71, in new_function
    res = function(*args, **kwargs)
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathOp.py", line 819, in execute
    result = self.opExecute(obj)
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathCircularHoleBase.py", line 194, in opExecute
    self.circularHoleExecute(obj, holes)
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathDrilling.py", line 253, in circularHoleExecute
    PathFeedRate.setFeedRate(self.commandlist, obj.ToolController)
  File "/usr/share/freecad-daily/Mod/Path/PathFeedRate.py", line 80, in setFeedRate
    if _isVertical(machine.getPosition(), command):
  File "/usr/share/freecad-daily/Mod/Path/PathFeedRate.py", line 72, in _isVertical
    return PathGeom.isVertical(Part.makeLine(currentposition, endpoint))
  File "/usr/share/freecad-daily/Mod/Path/PathScripts/PathGeom.py", line 180, in isVertical
    if type(obj.Curve) == Part.Line or type(obj.Curve) == Part.LineSegment:
<class 'Base.FreeCADError'>: Unknown exception while reading attribute 'Curve' of object 'TopoShape'
Screenshot from 2022-03-21 22-59-01.png
Screenshot from 2022-03-21 22-59-01.png (285.93 KiB) Viewed 2117 times

Code: Select all

OS: Ubuntu 21.10 (ubuntu:GNOME/ubuntu-xorg)
Word size of FreeCAD: 64-bit
Version: 0.20.
Build type: Release
Branch: unknown
Hash: c360c6e5f5a8cee3bd85c01cf97128a0b9e0e169
Python 3.9.7, Qt 5.15.2, Coin 4.0.0, OCC 7.5.2
Locale: C/Default (C)
Installed mods: 
  * FreeCAD_assembly3 0.11.0
File attached:
bearing_block.FCStd
(154.1 KiB) Downloaded 46 times
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: 0.20 regression? Drilling operation fails with a traceback

Post by GeneFC »

This is a very strange file. You are trying to drill stepped holes with a tool that is too large for the smaller, deeper holes.

I can make the operation "work" with either the upper set or the lower set, but not both at the same time. By "work" I mean there is no crash. However there is also no path for the holes that are too small.

It is possible that there is some error that was not trapped in version 0.19, but the file needs to be sorted out before anything else.

Gene
knipknap
Posts: 120
Joined: Sat Mar 05, 2022 1:21 pm

Re: 0.20 regression? Drilling operation fails with a traceback

Post by knipknap »

GeneFC wrote: Mon Mar 21, 2022 11:26 pm You are trying to drill stepped holes with a tool that is too large for the smaller, deeper holes.
True, I missed setting the correct tool diameter. However, after changing it to 3mm I see no change in the operation, the problem persists.
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: 0.20 regression? Drilling operation fails with a traceback

Post by GeneFC »

I still do not understand what you are trying to do. It is not physically possible to drill two different sizes within a single operation using a single tool.

Perhaps you want some sort of pocket instead of a drilled hole?

Gene
User avatar
sliptonic
Veteran
Posts: 3459
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: 0.20 regression? Drilling operation fails with a traceback

Post by sliptonic »

Does the problem occur in a new drill op or just the old one? Drilling got quite a bit of attention.
chrisb
Veteran
Posts: 54273
Joined: Tue Mar 17, 2015 9:14 am

Re: 0.20 regression? Drilling operation fails with a traceback

Post by chrisb »

Here a new Drilling op works, while the old doesn't. The whole file may not be in good condition: It shows lost Surface and Slot ops on top level:
SnipScreenshot-251689.png
SnipScreenshot-251689.png (14.45 KiB) Viewed 1779 times
Hint to knipknap: You shouldn't create the clone yourself, but rather turn the clone inside of the Path job.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Zivatar
Posts: 23
Joined: Thu Nov 12, 2020 5:31 pm

Re: 0.20 regression? Drilling operation fails with a traceback

Post by Zivatar »

Hello Guys,

I'd like to drill holes on an alu profile, and I made the attached .FcStd in forward to achieve the goal.
Drilling.FCStd
(24.65 KiB) Downloaded 25 times
My FreeCAD is:

Code: Select all

OS: openSUSE Leap 15.3 (GNOME/default)
Word size of FreeCAD: 64-bit
Version: 0.20.28945 (Git) AppImage
Build type: Release
Branch: (HEAD detached at 0fb7cd9)
Hash: 0fb7cd9758d850f536d571cc094c9833fee18fff
Python 3.9.13, Qt 5.12.9, Coin 4.0.0, OCC 7.5.3
I have the traceback:
19:39:46 Traceback (most recent call last):
File "/tmp/.mount_FreeCASM20N9/usr/Mod/Path/PathScripts/PathUtils.py", line 71, in new_function
res = function(*args, **kwargs)
File "/tmp/.mount_FreeCASM20N9/usr/Mod/Path/PathScripts/PathOp.py", line 819, in execute
result = self.opExecute(obj)
File "/tmp/.mount_FreeCASM20N9/usr/Mod/Path/PathScripts/PathCircularHoleBase.py", line 194, in opExecute
self.circularHoleExecute(obj, holes)
File "/tmp/.mount_FreeCASM20N9/usr/Mod/Path/PathScripts/PathDrilling.py", line 253, in circularHoleExecute
PathFeedRate.setFeedRate(self.commandlist, obj.ToolController)
File "/tmp/.mount_FreeCASM20N9/usr/Mod/Path/PathFeedRate.py", line 80, in setFeedRate
if _isVertical(machine.getPosition(), command):
File "/tmp/.mount_FreeCASM20N9/usr/Mod/Path/PathFeedRate.py", line 72, in _isVertical
return PathGeom.isVertical(Part.makeLine(currentposition, endpoint))
File "/tmp/.mount_FreeCASM20N9/usr/Mod/Path/PathScripts/PathGeom.py", line 180, in isVertical
if type(obj.Curve) == Part.Line or type(obj.Curve) == Part.LineSegment:
<class 'Base.FreeCADError'>: Unknown exception while reading attribute 'Curve' of object 'TopoShape'
19:39:46 Recompute failed! Please check report view.

Does anyone have any idea about what is the mistake, and how to make those holes well?

Thank You,
Zivatar
Syres
Veteran
Posts: 2901
Joined: Thu Aug 09, 2018 11:14 am

Re: 0.20 regression? Drilling operation fails with a traceback

Post by Syres »

Zivatar wrote: Tue May 31, 2022 6:02 pm Does anyone have any idea about what is the mistake, and how to make those holes well?
Setting StartDepth to 0.01 mm will get you going, whether this is a regression, not sure.
Zivatar
Posts: 23
Joined: Thu Nov 12, 2020 5:31 pm

Re: 0.20 regression? Drilling operation fails with a traceback

Post by Zivatar »

Syres wrote: Wed Jun 01, 2022 1:42 pm
Zivatar wrote: Tue May 31, 2022 6:02 pm Does anyone have any idea about what is the mistake, and how to make those holes well?
Setting StartDepth to 0.01 mm will get you going, whether this is a regression, not sure.
Thank You! Perfect! :)
Post Reply