Pocket milling (dev help)

303 views
Skip to first unread message

San Zamoyski

unread,
Jan 16, 2020, 6:24:25 AM1/16/20
to dxf2gcode-dev
Hi and hello everyone!

I'm happy to introduce dxf2gcode with pocket milling support. This work is inspired by thehammertownhead work [https://sourceforge.net/p/dxf2gcode/tickets/67/], but rewritten almost completely.

My goal was to create something that works, not necessarily efficient. I think I made it. It can be downloaded here: https://github.com/SanZamoyski/dxf2gcode-pocketMill/tree/Beta (remember to download Beta branch). 

There are some things that still need to be done, but I think that someone can find it useful and test it somehow for me.

Current TODO list can be found on Github:

dxf2gcode-pocketMill-Beta$ grep -Hrn '#TODO:' ./
./dxf2gcode/gui/canvas2d.py:41:                 #TODO: check if can be removed:
./dxf2gcode/gui/canvas.py:31:                   #TODO: check if can be removed:
./dxf2gcode/core/pocketmill.py:56:              #TODO: remove everywhere: self.stmove.shape.OffsetXY
./dxf2gcode/core/pocketmill.py:364:             #TODO: check if shape like this:
./dxf2gcode/core/pocketmill.py:372:             #TODO: joints will propably cause problems
./dxf2gcode/core/pocketmill.py:481:             #TODO: beans shape:  (____)
./dxf2gcode/core/pocketmill.py:483:             #TODO: "Only lines and <180 angle.
./dxf2gcode/core/pocketmill.py:666:             #TODO: convert it to move based on horizontal and vertical lines only
./dxf2gcode/core/pocketmill.py:720:             #TODO: tweak?
./dxf2gcode/core/pocketmill.py:732:             #TODO: compensation type 41
./dxf2gcode/core/shape.py:241:                  #TODO: end point will change to zig-zag's end
./dxf2gcode/core/rapidmove.py:96:               #TODO: going Z-up can be done as full speed?
./dxf2gcode/globals/config.py:42:               #TODO: check if can be removed: from dns.rdataclass import NONE

I need some help with original dxf2gcode [https://sourceforge.net/p/dxf2gcode/tickets/67/]:
My work is currently a bit stalled, but program works fine now. Not everything was tested yet (maybe I'm too lazy).
I might need Your help: I was wondering if we can add something like milling shape. I do not know how to call it, so I explain what I wish to see:
In main window, when shape is set to mill or pocket mill, the toolpath is shown with blue line, I would like to add another line of widith of 2 x tool_rad for example yellow with 60% transparency. So it will be very well seen how it will look after milling.
Second thing. I have added new class (RapidMove - I have another idea to make it work better, as it does not disable machine tool compensation for pocket milling, so name will change) that can be appended. The effect is that it is not well shown, as it seems to be ignored. Where is function that displays toolpath, so I can fix this?

And lots of tests. If You find some errors or have ideas, please write it here:  https://groups.google.com/forum/#!topic/dxf2gcode-users/wZfk-CgDXVw

Regards!
dxf2gcode - out.png
Wiele.ngc
dxf2gcode.png

Christian

unread,
Jan 16, 2020, 3:57:48 PM1/16/20
to dxf2gc...@googlegroups.com

Hi San,

 

thanks for the great work you did. I’m sorry that i Reply that late, but i had to get my 3d Printer running 😊 with Cura. I’m still not there, so my time is actually a bit limited in the next few weeks …

 

However i’m happy to see that Thing are progressing and i would even propose to integrate your changes in the development branch, if the others see not reason not to do it. I think this would enable the biggest community to test it. Even going beyond this we could compile a windows executable which even increases the people testing much more. What is your opinion about that – may be eben to much in the current state.

 

I can try to help you out with the existing code, but i’m not the specialist with all of that topics.

 

My work is currently a bit stalled, but program works fine now. Not everything was tested yet (maybe I'm too lazy).
I might need Your help: I was wondering if we can add something like milling shape. I do not know how to call it, so I explain what I wish to see:
In main window, when shape is set to mill or pocket mill, the toolpath is shown with blue line, I would like to add another line of widith of 2 x tool_rad for example yellow with 60% transparency. So it will be very well seen how it will look after milling.

  • I think the links provided below do Show how you might do it.


Second thing. I have added new class (RapidMove - I have another idea to make it work better, as it does not disable machine tool compensation for pocket milling, so name will change) that can be appended. The effect is that it is not well shown, as it seems to be ignored. Where is function that displays toolpath, so I can fix this?

--
--
You received this message because you subscribed to the Google
Groups-group "dxf2gcode-dev".
To post a message, send mail to dxf2gc...@googlegroups.com
To unsubscribe, send mail to dxf2gcode-de...@googlegroups.com
See http://groups.google.de/group/dxf2gcode-dev?hl=en for more options
and the dxf2gcode project page at http://code.google.com/p/dxf2gcode/
---
You received this message because you are subscribed to the Google Groups "dxf2gcode-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dxf2gcode-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dxf2gcode-dev/7cdc4999-a0a0-4a29-9350-907badad2b06%40googlegroups.com.

 

San Zamoyski

unread,
Jan 17, 2020, 11:27:56 AM1/17/20
to dxf2gcode-dev

thanks for the great work you did. I’m sorry that i Reply that late, but i had to get my 3d Printer running 😊 with Cura. I’m still not there, so my time is actually a bit limited in the next few weeks …


 My thesis defense will be in two weeks and the wedding in half a year, so I also have limited time resources ;)

However i’m happy to see that Thing are progressing and i would even propose to integrate your changes in the development branch, if the others see not reason not to do it. I think this would enable the biggest community to test it. Even going beyond this we could compile a windows executable which even increases the people testing much more. What is your opinion about that – may be eben to much in the current state.


I would love to! But hold on a second, as I want to add "disable tool compensation before pocket and reenable after", so it will also work if "tool compensation is done by machine".
I'll it here when I'm done.

I can try to help you out with the existing code, but i’m not the specialist with all of that topics.


I'm somehow unable to dig into those functions to find part of code which makes blue lines on the screen... I'll try that again, but later, as it can be marked non-critical.

Regards!

Christian

unread,
Jan 17, 2020, 12:29:37 PM1/17/20
to dxf2gc...@googlegroups.com

Hi San,

 

see my feedback below …

 

thanks for the great work you did. I’m sorry that i Reply that late, but i had to get my 3d Printer running 😊 with Cura. I’m still not there, so my time is actually a bit limited in the next few weeks …

 

 My thesis defense will be in two weeks and the wedding in half a year, so I also have limited time resources ;)

  • Good luck (or i hope you Need None, which is even better 😊)

However i’m happy to see that Thing are progressing and i would even propose to integrate your changes in the development branch, if the others see not reason not to do it. I think this would enable the biggest community to test it. Even going beyond this we could compile a windows executable which even increases the people testing much more. What is your opinion about that – may be eben to much in the current state.

 

I would love to! But hold on a second, as I want to add "disable tool compensation before pocket and reenable after", so it will also work if "tool compensation is done by machine".

I'll it here when I'm done.

  • Ok, i will wait until you come back …

 

I can try to help you out with the existing code, but i’m not the specialist with all of that topics.

 

I'm somehow unable to dig into those functions to find part of code which makes blue lines on the screen... I'll try that again, but later, as it can be marked non-critical.

  • I will support you there, at least with 2d (in first step). We just need to know where those lines are saved which you want to plot ….

 

Regards!

--
--
You received this message because you subscribed to the Google
Groups-group "dxf2gcode-dev".
To post a message, send mail to dxf2gc...@googlegroups.com
To unsubscribe, send mail to dxf2gcode-de...@googlegroups.com
See http://groups.google.de/group/dxf2gcode-dev?hl=en for more options
and the dxf2gcode project page at http://code.google.com/p/dxf2gcode/
---
You received this message because you are subscribed to the Google Groups "dxf2gcode-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dxf2gcode-de...@googlegroups.com.

San Zamoyski

unread,
Jan 19, 2020, 2:44:01 PM1/19/20
to dxf2gcode-dev

 My thesis defense will be in two weeks and the wedding in half a year, so I also have limited time resources ;)

  • Good luck (or i hope you Need None, which is even better 😊)
thanks! 

I would love to! But hold on a second, as I want to add "disable tool compensation before pocket and reenable after", so it will also work if "tool compensation is done by machine".

I'll it here when I'm done.

  • Ok, i will wait until you come back …
I'm still here! I've spend few hours trying to solve this problem and then realised it is... pointless (my solution was pointless, not the idea). So I just disabled PM when compensation by machine is set and noted it in config file.  

  •  I can try to help you out with the existing code, but i’m not the specialist with all of that topics. 

I'm somehow unable to dig into those functions to find part of code which makes blue lines on the screen... I'll try that again, but later, as it can be marked non-critical.

  • I will support you there, at least with 2d (in first step). We just need to know where those lines are saved which you want to plot ….
They are simply added to geos list by eg. self.stmove.append(RapidMove(realStart)) as RapidMove instance. It is initialised as:
class RapidMove(Point):
    def __init__(self, point):
        Point.__init__(self, point.x, point.y)
        self.abs_geo = None
        
        self.feedZ = 0
        self.feedXY = 0
        self.safe = 0
        self.depth = 0
        self.retr = 0

To be honest, I just copied RapidPos class and modified it (especially Write_GCode function).

San Zamoyski

unread,
Jan 22, 2020, 4:28:42 PM1/22/20
to dxf2gcode-dev
Found it!

It was hidden in RapidMove class as function make_path. I've converted it into PocketMove class (and some small minor changes) and now path is shown quite correct.
I've moved it from Beta branch to Release Candidate here: https://github.com/SanZamoyski/dxf2gcode-pocketMill/tree/RC1

I think it is quite ready, yet there is a lot to make it even cooler. ;)

Christian Kohlöffel

unread,
Jan 23, 2020, 12:42:41 AM1/23/20
to 'Timo Birnschein' via dxf2gcode-dev
I try to test it and integrate it into zu the development branch on the weekend. 

Regards CHRISTIAN

--
--
You received this message because you subscribed to the Google
Groups-group "dxf2gcode-dev".
To post a message, send mail to dxf2gc...@googlegroups.com
To unsubscribe, send mail to dxf2gcode-de...@googlegroups.com
See http://groups.google.de/group/dxf2gcode-dev?hl=en for more options
and the dxf2gcode project page at http://code.google.com/p/dxf2gcode/
---
You received this message because you are subscribed to the Google Groups "dxf2gcode-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dxf2gcode-de...@googlegroups.com.

San Zamoyski

unread,
Jan 23, 2020, 5:12:46 AM1/23/20
to dxf2gcode-dev
I try to test it and integrate it into zu the development branch on the weekend.

Updated comments for code explanations and TODOs. 

Christian

unread,
Jan 26, 2020, 4:57:11 AM1/26/20
to dxf2gc...@googlegroups.com

Hi,

 

i tried to merge then proposed RC1 from San into the development branch, but i am not a good git user and therefore i failed to do it. Can anyone help me on that and do it for me?

 

Thank you in Advance

 

Christian

--

--
You received this message because you subscribed to the Google
Groups-group "dxf2gcode-dev".
To post a message, send mail to dxf2gc...@googlegroups.com
To unsubscribe, send mail to dxf2gcode-de...@googlegroups.com
See http://groups.google.de/group/dxf2gcode-dev?hl=en for more options
and the dxf2gcode project page at http://code.google.com/p/dxf2gcode/
---
You received this message because you are subscribed to the Google Groups "dxf2gcode-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dxf2gcode-de...@googlegroups.com.

San Zamoyski

unread,
Jan 27, 2020, 8:27:31 AM1/27/20
to dxf2gcode-dev
I am also a poor GitHub user. I'm trying to learn it a bit on this occasion. ;)
What help do You need?

Christian Kohlöffel

unread,
Jan 27, 2020, 10:20:17 AM1/27/20
to 'Timo Birnschein' via dxf2gcode-dev
I know how to integrate a Branch from same repository, but how do I integrate a fork. Eclipse doesn't have such an option I think. Do I need a different tool or ?
I will ask Google this evening, maybe this will enlighten me

Regards Christian

San Zamoyski <niepamie...@gmail.com> schrieb am Mo., 27. Jan. 2020, 14:27:
I am also a poor GitHub user. I'm trying to learn it a bit on this occasion. ;)
What help do You need?

--
--
You received this message because you subscribed to the Google
Groups-group "dxf2gcode-dev".
To post a message, send mail to dxf2gc...@googlegroups.com
To unsubscribe, send mail to dxf2gcode-de...@googlegroups.com
See http://groups.google.de/group/dxf2gcode-dev?hl=en for more options
and the dxf2gcode project page at http://code.google.com/p/dxf2gcode/
---
You received this message because you are subscribed to the Google Groups "dxf2gcode-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dxf2gcode-de...@googlegroups.com.

Christian

unread,
Jan 27, 2020, 11:46:02 AM1/27/20
to 'Timo Birnschein' via dxf2gcode-dev

OK, now I think I understand a bit more, this is no fork, San do i guess right you just downloaded the files and modified them in your new git repository. Therefore there  is no link remaining to the reference right? Do you know if there are any changes since you did that? What Version did you use, did you start with the development branch which was valid 2 months ago? Therefore all the last changes in current branch? If not can you add them in there?

 

 

I would therefore if it’s based on newest Version just copy it to the development branch and do a commit with that Version. So all the history Information lost which was generated in the repository of San.

 

Does anyone have another way to do it better?

 

Regards

Christian

 

Von: Christian Kohlöffel
Gesendet: Montag, 27. Januar 2020 16:20
An: 'Timo Birnschein' via dxf2gcode-dev
Betreff: Re: [dxf2gcode-dev] Pocket milling (dev help)

 

I know how to integrate a Branch from same repository, but how do I integrate a fork. Eclipse doesn't have such an option I think. Do I need a different tool or ?

San Zamoyski

unread,
Jan 29, 2020, 5:56:27 AM1/29/20
to dxf2gcode-dev

OK, now I think I understand a bit more, this is no fork, San do i guess right you just downloaded the files and modified them in your new git repository. Therefore there  is no link remaining to the reference right? Do you know if there are any changes since you did that? What Version did you use, did you start with the development branch which was valid 2 months ago? Therefore all the last changes in current branch? If not can you add them in there?


I've downloaded dxf2gcode-20191025.zip version, uploaded it on gitHub and modified.
Fortunately most of modifications are packed into two new files (I always try to do modifications that way).
Unfortunately I'm currently loaded with other work, but if there is something I can do, please write.

Christian

unread,
Jan 29, 2020, 4:49:43 PM1/29/20
to dxf2gc...@googlegroups.com

Hi San,

 

Good to hear that you used the newest Version, that really helped a lot. I just reviewed all the files and uploaded them on a new branch in the git repository:

https://sourceforge.net/p/dxf2gcode/sourcecode/ci/PocketMill-new/tree/

 

Can you please check wheatear i did get all of the changes, just to be sure 😊 ....

 

After you checked that branch i will make it the development branch. Starting from there i would propose that you work directly in the development branch for any further changes, that would make it a bit easier for all i think. Do you already have an account on SourceForge which one i can add?

 

Regards

Christian

 

Ps: I would even propose to give you admin rights, in order to have full edit capabilities, what do yo think about it?

 

Von: San Zamoyski
Gesendet: Mittwoch, 29. Januar 2020 11:56
An: dxf2gcode-dev
Betreff: Re: [dxf2gcode-dev] Pocket milling (dev help)

 

 

OK, now I think I understand a bit more, this is no fork, San do i guess right you just downloaded the files and modified them in your new git repository. Therefore there  is no link remaining to the reference right? Do you know if there are any changes since you did that? What Version did you use, did you start with the development branch which was valid 2 months ago? Therefore all the last changes in current branch? If not can you add them in there?

--

--
You received this message because you subscribed to the Google
Groups-group "dxf2gcode-dev".
To post a message, send mail to dxf2gc...@googlegroups.com
To unsubscribe, send mail to dxf2gcode-de...@googlegroups.com
See http://groups.google.de/group/dxf2gcode-dev?hl=en for more options
and the dxf2gcode project page at http://code.google.com/p/dxf2gcode/
---
You received this message because you are subscribed to the Google Groups "dxf2gcode-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dxf2gcode-de...@googlegroups.com.

San Zamoyski

unread,
Feb 9, 2020, 11:54:12 AM2/9/20
to dxf2gcode-dev
Everything seems to be ok.

Good luck (or i hope you Need None, which is even better 😊)


I've succeed!
  

Can you please check wheatear i did get all of the changes, just to be sure 😊 ....


You missed some of my comments ;)
And translations. I do not know if it was by purpose.
 

After you checked that branch i will make it the development branch. Starting from there i would propose that you work directly in the development branch for any further changes, that would make it a bit easier for all i think. Do you already have an account on SourceForge which one i can add?


  

Ps: I would even propose to give you admin rights, in order to have full edit capabilities, what do yo think about it?

 
I'm not familar with SF at all, but I might try ;)
Maybe not FULL edit capabilities, but to moderate?
 

 

Von: San Zamoyski
Gesendet: Mittwoch, 29. Januar 2020 11:56
An: dxf2gcode-dev
Betreff: Re: [dxf2gcode-dev] Pocket milling (dev help)

 

 

OK, now I think I understand a bit more, this is no fork, San do i guess right you just downloaded the files and modified them in your new git repository. Therefore there  is no link remaining to the reference right? Do you know if there are any changes since you did that? What Version did you use, did you start with the development branch which was valid 2 months ago? Therefore all the last changes in current branch? If not can you add them in there?

 

I've downloaded dxf2gcode-20191025.zip version, uploaded it on gitHub and modified.

Fortunately most of modifications are packed into two new files (I always try to do modifications that way).

Unfortunately I'm currently loaded with other work, but if there is something I can do, please write.

--
--
You received this message because you subscribed to the Google
Groups-group "dxf2gcode-dev".
To post a message, send mail to dxf2gc...@googlegroups.com

To unsubscribe, send mail to dxf2gc...@googlegroups.com


See http://groups.google.de/group/dxf2gcode-dev?hl=en for more options
and the dxf2gcode project page at http://code.google.com/p/dxf2gcode/
---
You received this message because you are subscribed to the Google Groups "dxf2gcode-dev" group.

To unsubscribe from this group and stop receiving emails from it, send an email to dxf2gc...@googlegroups.com.

Ok Thierry

unread,
Oct 4, 2021, 9:52:51 AM10/4/21
to dxf2gcode-dev
Hi all, we're working on a DXF 2GCODE 2MACHINE in the cloud. In short, helping some folks in schools and maker spaces to have an easy intro to producing designs. It's nearly working except for Pocketing. We tried the different implementations of Pocketing (Including San Zamoyski's implementation) but had no luck. We can't get the pocketing to work nor use it via layer control. Looking out for help!

Christian Kohlöffel

unread,
Oct 4, 2021, 3:58:01 PM10/4/21
to dxf2gc...@googlegroups.com

Hi Thierry,

 

can you be a bit more precise on that. I just tried it on a quiete complex geometry I think and had no issues with it, see attached picture.

 

Regards

Christian  

 

cid:image001.png@01D7B964.FB9A4AA0

To unsubscribe, send mail to dxf2gcode-de...@googlegroups.com


See http://groups.google.de/group/dxf2gcode-dev?hl=en for more options
and the dxf2gcode project page at http://code.google.com/p/dxf2gcode/
---
You received this message because you are subscribed to the Google Groups "dxf2gcode-dev" group.

To unsubscribe from this group and stop receiving emails from it, send an email to dxf2gcode-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dxf2gcode-dev/073bd506-8d47-4603-90ea-a5b7189e26c9n%40googlegroups.com.

image001.png

Ok Thierry

unread,
Oct 5, 2021, 6:17:20 AM10/5/21
to dxf2gcode-dev
Hi Christian, 

It works on the desktop version on Windows, not on mac. That's fine. Maybe we didn't see the right settings on Mac but so far it is not a blocker. 

Since we are working on a UI-less version for the cloud (no human clicking), we're struggling to get the pocketing to work using the LayerControl function. Milling and Drilling is working with the LayerControl but not pocketing. 
Has anyone used LayerControl for Pocketing operations? 

unnamed.pngScreenshot 2021-10-05 at 12.46.58.png

Here is the GCODE: https://drive.google.com/drive/folders/1BaDKMGXjfvnizfJmh7Ku1kR7wx-4ZdkG?usp=sharing 

All the best, 
Thierry 

Ok Thierry

unread,
Oct 5, 2021, 6:29:29 AM10/5/21
to dxf2gcode-dev
Hi again,

One small question regarding Pocket Milling on MAC: If you look at the image (Windows in Clear and Mac in Dark), 
you can see that the description text is different between Windows and Mac. Is there a reason for that? 

The text in Windows includes ("This also disables pocket miling"). 

Screenshot 2021-10-05 at 13.20.40.png

Best,
Thierry 

Christian Kohlöffel

unread,
Oct 5, 2021, 12:54:19 PM10/5/21
to dxf2gc...@googlegroups.com

Hi Thierry,

 

maybe they are base on different version? I am not sure. But they should be the same …

 

Regarding the other topic:

the LayerControl function has been implemented long before the very new Pocketing operations. The Pocketing is still in development / beta. I don’t think that this is integrated up to now, at least I didn’t find it in the code:

 

Here you find the LayerControl functionality:

https://sourceforge.net/p/dxf2gcode/sourcecode/ci/develop/tree/source/dxf2gcode/core/layercontent.py#l87

 

Here you find the Point where automatic cutter compensation is done:

https://sourceforge.net/p/dxf2gcode/sourcecode/ci/develop/tree/source/dxf2gcode.py#l910

 

There is not much more which is done I guess. Therefore no pocketing called by any automatic means I guess. I hope this helps you ….

 

Regards

Christian

image001.png

Ok Thierry

unread,
Oct 7, 2021, 2:20:10 AM10/7/21
to dxf2gcode-dev
Hi Chris, 

Thank you for the guidance. It helped us to update that feature and it worked. PocketMill works with LayerControl. It also runs on mac (Linux) and in the cloud. We'll publish the code once we tested it a little more. 

Cheers,
Thierry 


Christian Kohlöffel

unread,
Oct 8, 2021, 12:05:56 PM10/8/21
to dxf2gc...@googlegroups.com

Hi Thierry,

 

that sound great, waiting for your update. I could also grant you developer rights to directly merge it into the development branch …

 

best regards

Ok Thierry

unread,
Oct 26, 2021, 5:42:58 AM10/26/21
to dxf2gcode-dev
Hello Christian, 

Could you give Manoj (I send you his email) the developer rights? He will do the merging. 

All the best,
Thierry 

Ok Thierry

unread,
Oct 29, 2021, 10:08:22 AM10/29/21
to dxf2gcode-dev
Hi all, 

It is not related to the Pocketing but kind of a continuity of this discussion. Since the Auto Tool Compensation wasn't working for us (and not working with Pocketing), we decided to automatize the tool compensation using the LayerControl. 
When possible, we will merge the code with the CutLine functionality Manoj built for the Layer Control. It allows one to define in the layer name which tool compensation to apply to the layer. 

Cheers,
Thierry 
Reply all
Reply to author
Forward
0 new messages