Path Operations refactor branch.

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Konstantin
Posts: 261
Joined: Wed Jul 23, 2014 10:10 am

Re: Path Operations refactor branch.

Postby Konstantin » Thu Aug 24, 2017 1:46 pm

After applying this change: https://github.com/mlampert/FreeCAD/com ... 3c9d3901f7

Pressing drilling betton causes this:

Code: Select all

raceback (most recent call last):
  File "/Data1/kostia/Bin/git/FreeCAD/build/Mod/Path/PathScripts/PathOpGui.py", line 94, in setEdit
    self.setupTaskPanel(TaskPanel(vobj.Object, self.deleteObjectsOnReject(), page, selection))
  File "/Data1/kostia/Bin/git/FreeCAD/build/Mod/Path/PathScripts/PathOpGui.py", line 602, in __init__
    self.featurePages.append(TaskPanelBaseLocationPage(obj, features))
  File "/Data1/kostia/Bin/git/FreeCAD/build/Mod/Path/PathScripts/PathOpGui.py", line 157, in __init__
    self.form = self.getForm()
  File "/Data1/kostia/Bin/git/FreeCAD/build/Mod/Path/PathScripts/PathOpGui.py", line 409, in getForm
    if QtCore.__version_info__[0] == 4:
<type 'exceptions.AttributeError'>: 'module' object has no attribute '__version_info__'
Searched a bit by myself, found this: https://github.com/mottosso/Qt.py/issues/40 very well explained. Nice. But it looks that on later Qt5 __version_info__ and __version__ was removed, or placed somewhere else?

Tried to change "if" line to "if QtCore.qVersion()[0] == 4:". Now that's worked for me. But will it work on Qt4? :)
Konstantin
Posts: 261
Joined: Wed Jul 23, 2014 10:10 am

Re: Path Operations refactor branch.

Postby Konstantin » Thu Aug 24, 2017 2:12 pm

Second problem. Now It doesnt' produce path for drilling.
Extruded sketch with holes, added Job, Tool, selected top face, Drilling, but pressing Ok does nothing. in output I see

Code: Select all

Drilling Select Mode
PathCircularHoleBase(224).setDepths(Drilling, 10.0, 10.0, BoundBox (2.59374, 2.84076, 0, 89.2986, 68.7958, 10))
PathCircularHoleBase.DEBUG: setDepths(Drilling): z=10.00 -> 10.00 bb.z=0.00 -> 10.00
PathCircularHoleBaseGui(59).setFields()
PathCircularHoleBaseGui(59).setFields()
PathDrillingGui(71).setFields()
PathDrillingGui(55).getFields()
PathDrillingGui(55).getFields()
PathCircularHoleBase(135).opExecute()
PathCircularHoleBase.ERROR: Feature Extrude.Face11 cannot be processed as a circular hole - please remove from Base geometry list.
Free Select
File attached.
Attachments
aaaaaaa.FCStd
(10.01 KiB) Downloaded 9 times
Konstantin
Posts: 261
Joined: Wed Jul 23, 2014 10:10 am

Re: Path Operations refactor branch.

Postby Konstantin » Thu Aug 24, 2017 2:27 pm

Hm. opened drilling operation again, removed this top face from BaseGeometry list, then all holes appeared.

And a question, what Base location does at all? Tried to input there something,butcouldn't understand. And I can't close drilling operation after that :)
mlampert
Posts: 1349
Joined: Fri Sep 16, 2016 9:28 pm

Re: Path Operations refactor branch.

Postby mlampert » Thu Aug 24, 2017 9:21 pm

Konstantin wrote:
Thu Aug 24, 2017 2:27 pm
Hm. opened drilling operation again, removed this top face from BaseGeometry list, then all holes appeared.

And a question, what Base location does at all? Tried to input there something,butcouldn't understand. And I can't close drilling operation after that :)
The base geometry for drilling and helix are the actual holes. So when you add the top face as a base geometry the algorithm can't figure out how to drill that one. If you don't use "Reset" (which will try and find all drillable features in Base) you can select cylinder faces or circular edges and add them to the base geometry list - the operation will perform a drilling op on the center of each of them.

I cannot reproduce the not being able to close the dialog - would you have some more details on what you did?

Thanks for testing the QT version and also for finding an approach that works ;) I've updated the branch.
Konstantin
Posts: 261
Joined: Wed Jul 23, 2014 10:10 am

Re: Path Operations refactor branch.

Postby Konstantin » Fri Aug 25, 2017 7:58 am

mlampert wrote:
Thu Aug 24, 2017 9:21 pm
The base geometry for drilling and helix are the actual holes. So when you add the top face as a base geometry the algorithm can't figure out how to drill that one. If you don't use "Reset" (which will try and find all drillable features in Base) you can select cylinder faces or circular edges and add them to the base geometry list - the operation will perform a drilling op on the center of each of them.
Yes, thank you. I played a bit with it, my alarming here was to early :)
I cannot reproduce the not being able to close the dialog - would you have some more details on what you did?
First - I don't have any clue, what this "Base Location" in drilling operation dialoque does. So when I successefuly created Drilling operation, I opened it's dialofuq again and found
Screenshot_20170825_103335.png
Screenshot_20170825_103335.png (24.58 KiB) Viewed 599 times
After pressing "Add" button this appeared
Screenshot_20170825_103418.png
Screenshot_20170825_103418.png (28.3 KiB) Viewed 599 times
And if I press "Save" button, nothing happens."Close" button I can'tchange, on top buttons are grayed out to. In console no errors or anything aboutit.
Thanks for testing the QT version and also for finding an approach that works ;) I've updated the branch.
No "thanks", I deed a very little. I wish I could make more, still laying in the bed and have plenty of time, but ny head is killing me, aand I'm lazy to.

But you, guys, are my real heros. You are doing so much... You are making so much valuable job.

P.S. Make a poster with all FreeCAD devs, I will put it on the wall :)
P.P.S Do you have some conferences, or some kind of meetups somewhere in europe?
mlampert
Posts: 1349
Joined: Fri Sep 16, 2016 9:28 pm

Re: Path Operations refactor branch.

Postby mlampert » Fri Aug 25, 2017 3:35 pm

Konstantin wrote:
Fri Aug 25, 2017 7:58 am
And if I press "Save" button, nothing happens."Close" button I can'tchange, on top buttons are grayed out to. In console no errors or anything aboutit.
Right, this is the feature roivai added a few weeks ago. When the dialog with "Global X" and "Global Y" is up and you can either click somewhere on your model with the mouse, or enter coordinates directly into the input fields - and the operation will drill additional holes there. So if you need an additional hole to screw down your model or last minute you want some more vent holes ....
P.S. Make a poster with all FreeCAD devs, I will put it on the wall :)
P.P.S Do you have some conferences, or some kind of meetups somewhere in europe?
ha - wouldn't that be fun.
chrisb
Posts: 19055
Joined: Tue Mar 17, 2015 9:14 am

Re: Path Operations refactor branch.

Postby chrisb » Sun Aug 27, 2017 8:03 am

mlampert wrote:
Tue Aug 22, 2017 5:59 pm
PR-929 has been merged.
I am (re-)building the paths of an object using ShapeStrings. Using "Pocket from face" I get unexpected results:
  • Pocket from face contains all numbers from the upper line, alas, 6 and 0 are missing. I guess it's the already known problem from the U-shape.
  • I get an error message in the report view:

    Code: Select all

    Exception (Sun Aug 27 08:00:07 2017): failed to get bound box  
    {'swhat': 'failed to get bound box', 'sfunction': '', 'btranslatable': False, 'sfile': '', 'sclassname': 'N4Base10ValueErrorE', 'breported': True, 'sErrMsg': 'failed to get bound box', 'iline': 0}Something unexpected happened. Check project and tool config.
  • Using the Line pattern I get lots of vertical rapids - which is probably correct; the islands inside of the 8 are pocketed as well
    Bildschirmfoto 2017-08-27 um 07.48.40.png
    Bildschirmfoto 2017-08-27 um 07.48.40.png (83.99 KiB) Viewed 519 times
  • Using Offset pattern creates a path for the 0 respecting the island. The islands inside of the 8 are still ignored
    Bildschirmfoto 2017-08-27 um 07.56.55.png
    Bildschirmfoto 2017-08-27 um 07.56.55.png (20.88 KiB) Viewed 519 times
  • Switching back to linear: now the path for 0 is created.
  • Spiral pattern respects the islands in 8 and 0,but not in 6.
chrisb
Posts: 19055
Joined: Tue Mar 17, 2015 9:14 am

Re: Path Operations refactor branch.

Postby chrisb » Sun Aug 27, 2017 8:20 am

If I use "Profile from Faces" with "Process Holes" I get a Path as desired.

Edit: The paths for the letters with islands are fancy: In the first go all the insides are processed in the second go all outsides.
chrisb
Posts: 19055
Joined: Tue Mar 17, 2015 9:14 am

Re: Path Operations refactor branch.

Postby chrisb » Sun Aug 27, 2017 10:47 am

On Ubuntu 0.17.11919 I can edit an existing Drilling object, i.e. remove or add elements etc. Same version on MacOS I get only the Transform panel which allows to move an Element in the coordinate system. The other panels I tried don't have that problem. It might be a locale or Qt 5 problem. (I like having the locale in the FreeCAD info).

OS: Ubuntu 14.04.5 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11919 (Git)
Build type: None
Branch: master
Hash: fccb5dbc87b919164610296adc96aa8b4fe4825e
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: English/UnitedStates (en_US)

OS: Mac OS X
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11919 (Git)
Build type: Release
Branch: (detached from fccb5db)
Hash: fccb5dbc87b919164610296adc96aa8b4fe4825e
Python version: 2.7.13
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: German/Germany (de_DE)
chrisb
Posts: 19055
Joined: Tue Mar 17, 2015 9:14 am

Re: Path Operations refactor branch.

Postby chrisb » Sun Aug 27, 2017 11:57 am

I am sorry for buzzing so much around, but I found something more: I have added a PocketFromFace for the outer frame (no letters at all). The generated path contains very small bits of the letters, which happen to have the same depth as the outer frame.
The letters themselves have ProfileFromFaces paths.
Attachments
Bildschirmfoto 2017-08-27 um 13.51.41.png
Bildschirmfoto 2017-08-27 um 13.51.41.png (23.8 KiB) Viewed 501 times