Couple of potential bugs...

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!
User avatar
JoshM
Posts: 456
Joined: Thu Oct 05, 2017 5:34 pm
Location: New Hampshire

Re: Couple of potential bugs...

Post by JoshM »

Drilling and Helix operations seem to have been disabled in latest updates. I no longer get any dialog for either Op now.
Best,
Josh


OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.12703 (Git)
Build type: Release
Branch: master
Hash: e7d4296b2918f4ab939b9d425347d8fa5833de5b
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: English/UnitedStates (en_US)
roivai
Posts: 117
Joined: Thu Feb 02, 2017 5:29 pm
Location: Oulu, Finland

Re: Couple of potential bugs...

Post by roivai »

JoshM wrote: Fri Dec 01, 2017 4:18 pm Drilling and Helix operations seem to have been disabled in latest updates. I no longer get any dialog for either Op now.
Best,
Josh
Oh crap, seems so. It clearly relates to changes I made last time, but something else as well because I'm 100% they worked multiple builds after that edit. I'll try to figure out what's going on right away. Thanks for pointing out.
roivai
Posts: 117
Joined: Thu Feb 02, 2017 5:29 pm
Location: Oulu, Finland

Re: Couple of potential bugs...

Post by roivai »

So the error thrown is:

Code: Select all

'ObjectDrilling' object has no attribute 'baseobject'
Which means that the initialization of obj.baseobject is not done at the point where I added that call to findAllHoles()-function. The operations work if I simply add obj.recompute() before calling that. I haven't been studying the code after the major refactoring of PathOp related stuff, so I am quite lost there. So I don't know why the recompute is required there or is that the best way to clear this problem. @mlampert what do you think?

For anyone willing to fix it right now, the Create() function on the end of file PathDrilling.py and PathHelix.py should be modified to contain obj.recompute() like so:

Code: Select all

def Create(name):
    '''Create(name) ... Creates and returns a Helix operation.'''
    obj = FreeCAD.ActiveDocument.addObject("Path::FeaturePython", name)
    proxy = ObjectHelix(obj)
    if obj.Proxy:
        obj.recompute()
        proxy.findAllHoles(obj)
    return obj
Another thing I noticed is that on the Base Location tab, pressing Add and manually writing the coordinates or pressing Edit and trying to modify existing location does not work. I need to go right now, so I couldn't investigate this at all..
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: Couple of potential bugs...

Post by mlampert »

Interesting I moved the initialization of Proxy to the end of init in order to deal with the situation where the user hits cancel when selecting a tool (hence the if clause in Create). Once Proxy gets assigned the framework automatically calls execute - I found no way to prevent that, which is why Proxy is now assigned conditionally.

I'm surprised recompute changes anything which basically just calls execute for all dirty objects.
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: Couple of potential bugs...

Post by mlampert »

It seems that behaviour changed - assigning Proxy doesn't trigger a call to execute anymore.
Edit: PR-1134
Joel Stienlet
Posts: 7
Joined: Sat Dec 02, 2017 5:20 pm

Re: Couple of potential bugs...

Post by Joel Stienlet »

The circular hole bug seems solved with fix 1134, but I still have some strange thing:
PathOpGui.INFO: Title: 'Drilling'
Drilling Select Mode
PathCircularHoleBase.ERROR: Feature Base-Body.Face8 cannot be processed as a circular hole - please remove from Base geometry list.
PathDrilling(77).circularHoleExecute()
-> this is the bottom of a pocket created from a circle in a sketch, I think it should be a valid selection for creating a circular hole.
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: Couple of potential bugs...

Post by mlampert »

Joel Stienlet wrote: Sun Dec 03, 2017 10:15 am The circular hole bug seems solved with fix 1134, but I still have some strange thing:
PathOpGui.INFO: Title: 'Drilling'
Drilling Select Mode
PathCircularHoleBase.ERROR: Feature Base-Body.Face8 cannot be processed as a circular hole - please remove from Base geometry list.
PathDrilling(77).circularHoleExecute()
-> this is the bottom of a pocket created from a circle in a sketch, I think it should be a valid selection for creating a circular hole.
could you attach the file so we can have a look?
Joel Stienlet
Posts: 7
Joined: Sat Dec 02, 2017 5:20 pm

Re: Couple of potential bugs...

Post by Joel Stienlet »

I've created a minimal file that gives me this this error (with fix 1134):
https://drive.google.com/open?id=1HgcbG ... 4mw4GflJ2m
the error is triggered when I click on "OK" ok "Apply" when creating the drilling.
chrisb
Veteran
Posts: 53935
Joined: Tue Mar 17, 2015 9:14 am

Re: Couple of potential bugs...

Post by chrisb »

You try to drill a 1.535mm hole with a 5mm tool :o . That won't work
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Joel Stienlet
Posts: 7
Joined: Sat Dec 02, 2017 5:20 pm

Re: Couple of potential bugs...

Post by Joel Stienlet »

Sorry, I should have set a correct diameter, this was misleading. So I uploaded a new file, this time the diameters should be correct (I hope so, 3mm diameter drill for a +-3mm diameter hole):
https://drive.google.com/open?id=1hCLvT ... Thn6uG3BhW
Anyway, the error message "Feature Base-Body.Face8 cannot be processed as a circular hole - please remove from Base geometry list" seems not to refer to a diameter mismatch I think.
N.B. a reasonable mismatch between tool and theoretical diameter should be allowed I think, as you don't always have the precise tool in the shop. Not everybody has anyway. And sometimes larger is better than smaller (ex: through hole component in a PCB). The best would be to specify tolerances +- while defining the geometry, and then check if the tool matches these tolerances. I don't know if there's something like this, I'm still new at FreeCAD, I haven't tested all the features yet...
Post Reply