Pocket milling would be a great addition to dxf2gcode!
It should be selectable feature by feature, and generate path (compatible with cutter compensation).
I found this under GPLv3:
11. Rectangulare-Circulare Pocketing Generator http://wiki.linuxcnc.org/cgi-bin/wiki.pl?Simple_EMC_G-Code_Generators
Could that algorithm be integrated in dxf2gcode as a start?
Nice find. I can really seee the benefit from this. But I rather make it a bit more complicated for us by applying this to custom shapes. Maybe something with the use of the layeroptions - so if it is on that layer it will create a pocket wrt the shape.
I think we pretty much already have this now - sort of - with the cutter offset (which will be in the new version) - only have to repeat it until it reaches the middle..., and make it a continous path...
Have to think about it some more
But unless somebody else implements it, it will take a while.
Last edit: J-P 2015-07-02
Hi there,
as some of you may know I'm still working on this topic, refer too:
https://groups.google.com/forum/#!topic/dxf2gcode-dev/1_jMBsxpH5I
Since I just broke two fingers while riding my MTB and became father for the 2nd time it may need some more time to finish with all exceptions handled, but I will have a preliminary version soon.
JP what kind of support do you need to implement it into the OPENGL version? I may find some time to support soon. I think for the previous version it will just produce additional effort.
regards Christian
Hiya,
To bad of your fingers. But a big gongratz on the little one!!!
I currently really have no time to implement it. I am working on saving all settings etc (with the use of a project file). It actually already works very nice, but it needs some more work such that it can handle some changes to the original dxf.
I think we should really abandon all branches except Bringing_both_versions_together (this branch has the 2d - old version- and the new 3d version - activated in the config file with mode3d- it runs with python 2 and 3, and pyqt4 and 5. So that branch should really become the new preferred branch.
Maybe you can implement your offset algorithm like I did mine in the stmove.py
My version can be found in the function make_own_cutter_compensation(self)
Check it out and please do add yours. I'm also really curious in if your offset algorithm works even better than mine, such that you can replace it.
Let me know if you need some help.
By the way if not known now - there is also a nice python lib for pocket stuff called libarea.
https://github.com/Heeks/libarea
see
https://sourceforge.net/p/dxf2gcode/sourcecode/ci/feature/PocketMill/~/tree/
in the source..... I have implemented this functionality.
example images
https://groups.google.com/forum/?hl=en#!topic/dxf2gcode-dev/Snh802YqQos
Last edit: thehammertownhead 2017-01-11
Looks nice. Only if you could try to reduce the copy paste part then it is really great. So try to move it to some functions - otherwise the code becomes a little bit messy and unreadable in the future.
J-P,
hey J-P, thanks for the feedback. Which part of the code are you referring
to? in stmove?
I'm not a developer by trade......its just a hobby, so my coding is a
little unorthodox......and likely doesn't follow best practice.
But I can try to clean some of it up.......but time is limited with family
and life.
cheers!
Last edit: thehammertownhead 2017-03-03
Hi!
Any update about that? I would very like to help with developing that. I can try to program (unfortunately in PHP or C++) script to generate path which can be translated and used as part of d2g. I need an information (or, better, example data) which would be sent to function and how should I format output.
Best regards!
Also, to not resolve problem already solved, it would be easier to start from offseted path already generated in dxf2gcode.
Ok, i moved thehammertownhead's modifications to current version and it works. Unfortunately it works only for simple shapes (circles and rectangles). I'll try to remake it as functions and for other shapes.
https://github.com/SanZamoyski/dxf2gcode-pocketMill
Thank you san for diggin into this. I would also start based on the shapeoffset.py function. That would make Things a bit easier i guess. If you Need Special help in existing Code feel free to ask …
Regards
Christian
Von: San Zamoyski
Gesendet: Samstag, 14. Dezember 2019 20:27
An: [dxf2gcode:tickets]
Betreff: [dxf2gcode:tickets] #67 Pocket Milling
Ok, i moved thehammertownhead's modifications to current version and it works. Unfortunately it works only for simple shapes (circles and rectangles). I'll try to remake it as functions and for other shapes.
https://github.com/SanZamoyski/dxf2gcode-pocketMill
[tickets:#67] Pocket Milling
Status: Started
Created: Tue Jun 16, 2015 12:05 AM UTC by romain145
Last Updated: Thu Dec 12, 2019 04:04 PM UTC
Owner: thehammertownhead
Pocket milling would be a great addition to dxf2gcode!
It should be selectable feature by feature, and generate path (compatible with cutter compensation).
I found this under GPLv3:
11. Rectangulare-Circulare Pocketing Generator http://wiki.linuxcnc.org/cgi-bin/wiki.pl?Simple_EMC_G-Code_Generators
Could that algorithm be integrated in dxf2gcode as a start?
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/dxf2gcode/tickets/67/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
Related
Tickets:
#67I will, ofcourse. Currently I'm digging into shape.py and stmove.py and, unfortunately, found quite serious bug. See attachement. I've found some articles (I'm working at university, so I have free access to many databases), and I'll try to read it, understand and implement. Unfortunately python is not my native language ;)
Ok, my first question about existing code!
I'm modyfing make_start_moves function (not sure if it is what i need n the end, but it will show me tool path in gui so everything will be visible ;)). I've removed the original part of pocket milling and put this:
So it should list for me all lines in shape, but it shows it twice (rectangular example):
Why is that?
Unfortunately exporting no longer work...
Hi,
Maybe i did get the Question wrong. But a normal rectangle has 4 lines but the shpe example has eight:
Line:
Rectangle 1:
LineGeo(Ps=Point(x=-11.8000608396 ,y=26.9384182365),
Pe=Point(x=-19.6939341748, y=26.9384182365))
Line:
LineGeo(Ps=Point(x=-19.6939341748 ,y=26.9384182365),
Pe=Point(x=-19.6939341748, y=45.8837142411))
Line:
LineGeo(Ps=Point(x=-19.6939341748 ,y=45.8837142411),
Pe=Point(x=-11.8000608396, y=45.8837142411))
Line:
LineGeo(Ps=Point(x=-11.8000608396 ,y=45.8837142411),
Pe=Point(x=-11.8000608396, y=26.9384182365))
Rectangle 2:
Line:
LineGeo(Ps=Point(x=-11.8000608396 ,y=26.9384182365),
Pe=Point(x=-19.6939341748, y=26.9384182365))
Line:
LineGeo(Ps=Point(x=-19.6939341748 ,y=26.9384182365),
Pe=Point(x=-19.6939341748, y=45.8837142411))
Line:
LineGeo(Ps=Point(x=-19.6939341748 ,y=45.8837142411),
Pe=Point(x=-11.8000608396, y=45.8837142411))
Line:
LineGeo(Ps=Point(x=-11.8000608396 ,y=45.8837142411),
Pe=Point(x=-11.8000608396, y=26.9384182365))
But i think i did get the Question wrong?
⇒make_start_moves function
This one was initialy only used to generate additional geometries for start while cutter compensation is active. However i did use it in exactly the same way you did. But someday it would be better to have something seperate for the pocketmilling 😊 …. (Not to focus on that now)
Regards
Christian
Von: San Zamoyski
Gesendet: Montag, 16. Dezember 2019 15:21
An: [dxf2gcode:tickets]
Betreff: [dxf2gcode:tickets] #67 Pocket Milling
Ok, my first question about existing code!
I'm modyfing make_start_moves function (not sure if it is what i need n the end, but it will show me tool path in gui so everything will be visible ;)). I've removed the original part of pocket milling and put this:
# Pocket Milling - draw toolpath
if self.shape.Pocket == True:
So it should list for me all lines in shape, but it shows it twice (rectangular example):
Line:
LineGeo(Ps=Point(x=-11.8000608396 ,y=26.9384182365),
Pe=Point(x=-19.6939341748, y=26.9384182365))
Line:
LineGeo(Ps=Point(x=-19.6939341748 ,y=26.9384182365),
Pe=Point(x=-19.6939341748, y=45.8837142411))
Line:
LineGeo(Ps=Point(x=-19.6939341748 ,y=45.8837142411),
Pe=Point(x=-11.8000608396, y=45.8837142411))
Line:
LineGeo(Ps=Point(x=-11.8000608396 ,y=45.8837142411),
Pe=Point(x=-11.8000608396, y=26.9384182365))
Line:
LineGeo(Ps=Point(x=-11.8000608396 ,y=26.9384182365),
Pe=Point(x=-19.6939341748, y=26.9384182365))
Line:
LineGeo(Ps=Point(x=-19.6939341748 ,y=26.9384182365),
Pe=Point(x=-19.6939341748, y=45.8837142411))
Line:
LineGeo(Ps=Point(x=-19.6939341748 ,y=45.8837142411),
Pe=Point(x=-11.8000608396, y=45.8837142411))
Line:
LineGeo(Ps=Point(x=-11.8000608396 ,y=45.8837142411),
Pe=Point(x=-11.8000608396, y=26.9384182365))
Why is that?
Unfortunately exporting no longer work...
[tickets:#67] Pocket Milling
Status: Started
Created: Tue Jun 16, 2015 12:05 AM UTC by romain145
Last Updated: Sun Dec 15, 2019 09:05 AM UTC
Owner: thehammertownhead
Pocket milling would be a great addition to dxf2gcode!
It should be selectable feature by feature, and generate path (compatible with cutter compensation).
I found this under GPLv3:
11. Rectangulare-Circulare Pocketing Generator http://wiki.linuxcnc.org/cgi-bin/wiki.pl?Simple_EMC_G-Code_Generators
Could that algorithm be integrated in dxf2gcode as a start?
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/dxf2gcode/tickets/67/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
Related
Tickets:
#67Unfortunately You missunderstand me (but it is definietly my fault also). It does this function twice - it is well seen in my current version like this:
Printing those arrays is, ofcourse, done once in my scripts.
Unfortunately it became impossible in some moment to make it without using classes, so there is new file (pocketmill.py) with needed stuff.
I have to explain some things, since not everything is explained with comments (I'm doing it from time to time ;)). The idea is to create function of fallback type. The real goal is to make scripts for some shapes like circle, rectangular (these are already done, but not always work as they should), beans, rhombes. If current Shape does not fit to any of these it uses fallback function that will work for every shape (but is slow and only zig-zag).
How does this function work at the moment - it creates a net of points that covers BBox of Shape with some basic distance (to be tweaked), than checks all points for:
- not too close to the Shape,
- not outside the Shape.
After that (works in slow-progress), generates lines based on those points.
Why I decided to do it that way?: First of all - I need do know somehow how d2g does work by now and learn Python by the way. Second the idea seems to be quite simple [1], so I was hoping that I'm able to make it. And third - it gives posibility to make it able to pocket-mill Shapes with Shape INSIDE (eg. round island inside circle).
[1] yeah, right. But, anyway, I'm not sure it is accurate, but i thing further tests will show this. Also, I belive it will be easy to tweak that way (adding new points is always possible since structure of points array (class!)).
Complete „release” can be downloaded here: https://github.com/SanZamoyski/dxf2gcode-pocketMill/tree/Pre-alpha, since I decided to leave Master branch as vanilla version with hammertownhead modifications.
Hi there!
Pre-alpha is now working. There are some bugs at the moment (well seen on attached screenshoot), but these are easy to fix I think. I need some comments to believe I'm on a good road ;)
There are many things that may need tweaks, but there is one difficult for me: if we have a shape that must be milled in two stages, how do you make the transition between them not in the material? (see spline-shape and star)
Also, how to check if shape is closed?
Regards!
Anyone?
https://github.com/SanZamoyski/dxf2gcode-pocketMill/tree/Beta
Please read README.
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
I have seen your awesome work! Sorry if you don't get many
replies, you get no answers just because very few people are
registered to this list (I am an former developer of dxf2gcode,
hence my message here).
Rest assured that your work will be widely used and appreciated. I
have not tested it yet because I am not milling pieces currently,
but I will do it in the future for sure.
Keep-up the good work, pocket milling is the missing feature in
dxf2gcode!
Xavier
San Zamoyski wrote:
Related
Tickets:
#67I'm very happy to read Your message!
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?
Kindly regards.
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
"milling shape": it may be a good idea yes, I am just wondering
what will be the result with several slices stacked together for
the same pocket?
I can't help here, AFAIR, it was jp1357 who did the 3D graphic
part ; maybe you can send him an email?
As for your second question, I don't know either (it's been a long
time since I didn't dig into dxf2gcode code ...). It think
Christian could help here ; I don't know if he has seen your
messages?
Regards,
Xavier
San Zamoyski wrote:
Related
Tickets:
#67I'm writing those messages on page: https://sourceforge.net/p/dxf2gcode/tickets/67/
I'm bit confused now - should I write it here, open new ticket or on goole group?
About milling shape - only one slice should be shown, but if there is some path overlaping another „the sum” would be darker. This will also help to debug and tweak some numbers used in the code.
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
on sourceforge are only sent to the developers, eg about 5-6
people.
The discussion groups for dxf2gcode (dxf2gcode-users
& dxf2gcode-dev)
are on google, and much more people will see your message if you
write here.
San Zamoyski wrote:
Related
Tickets:
#67Thanks,
https://groups.google.com/forum/#!topic/dxf2gcode-users/wZfk-CgDXVw - for users
https://groups.google.com/forum/#!topic/dxf2gcode-dev/ZmY5iOnNvnY - for devs
Regards!