New scrypt image-to-gcode.py - how to put on GIT ?

More
24 Jul 2014 14:12 - 25 Dec 2014 21:21 #49074 by Harmonist
My name is Alex. Sorry for my english.

I was refactoring code in python scrypt image-to-gcode.py. (I work this 1,5 years :blush: .)

File Attachment:

File Name: image-to-g...v3.7.zip
File Size:22 KB


2014-12-26 - new ver 3.8.7

File Attachment:

File Name: image-to-g....8.7.zip
File Size:25 KB




I expanded functionality. Added 2 mode "Rows objectiv" "Cols objectiv" and some other functions.
You can see the results of these modes here:











translate.google.com.ua/translate?sl=ru&tl=en&js=y&prev=_t&hl=ru&ie=UTF-8&u=http%3A%2F%2Fcnc-club.ru%2Fforum%2Fviewtopic.php%3Ff%3D15%26t%3D3541%23p110429&edit-text=

original url cnc-club.ru/forum/viewtopic.php?f=15&t=3541#p110429 and cnc-club.ru/forum/viewtopic.php?f=15&t=2460


I think that it is necessary to update the script on GIT for it to become available to all users LinuxCNC. But I do not know much English and I can not write the correct documentation and comments.

Could you advise me of those engaged in finalizing LinuxCNC so I sent him this question?
Attachments:
Last edit: 25 Dec 2014 21:21 by Harmonist. Reason: new version 3.8.7

Please Log in or Create an account to join the conversation.

More
24 Jul 2014 17:51 #49081 by BigJohnT
I posted a link to this thread on the Developers mailing list.

JT
The following user(s) said Thank You: Harmonist

Please Log in or Create an account to join the conversation.

More
24 Jul 2014 20:06 #49087 by Rick G
Looks good and very interesting.

Rick G

Please Log in or Create an account to join the conversation.

More
24 Jul 2014 23:28 #49095 by BigJohnT
I got a response from the original author of image to g code.

I was the primary author of image-to-gcode but I don't maintain it much
these days. I welcome a new maintainer, particularly one who actually
uses it!

Jeff


So, would you like to be the new maintainer?

JT

Please Log in or Create an account to join the conversation.

More
24 Jul 2014 23:35 #49097 by BigJohnT
More feedback from a couple of developers:

<cradek> jthornton: it would be absolutely great if alex/harmonist wants to improve and maintain i2g
<jepler> the code's not obviously terrible
<jepler> the guy is clearly actually using it
<jepler> I'm happy if someone can help him learn enough git to put his stuff in linuxcnc master branch


JT

Please Log in or Create an account to join the conversation.

More
25 Jul 2014 13:30 - 25 Jul 2014 13:49 #49116 by Harmonist

<jepler> the code's not obviously terrible

This is my first work on Python. In processing a serious bug: it uncontrolled eating memory (for large pictures 4000x2000 - eaten 1.5GB memory). Somewhere I do not clear the memory ... I would be grateful if someone would find this bug and fix it.

<BigJohnT> So, would you like to be the new maintainer?

I am very pleased your suggestion, but unfortunately I ran out of gas.
During development I understood almost everything code (except for a pair of functions), and now I see a lot of flaws that (I think) can be eliminated only by creating g-code for 3d models.
Some of the most significant are:
- To increase the accuracy necessary to increase the size of the image, while increasing the size of the image - growing time "compilation" g-code.

While CAM has turned very functional. It has the features that I have not seen in traditional CAM. I think using the image-to-gcode can even get 3d model - without turning preform from different sides, but only by making rotation axis Y.

I plan to describe the basic algorithm that I developed in the pictures, that any developer understands how it works and could freely continue improving the image-to-gcode or its CAM ...
This is the algorithm that makes the g-code only in those places where it is not included roughing cutter and depth of these locations exceed the maximum permissible maximum. Only in such places formed g-code for fine milling at a predetermined pitch penetration. It is necessary to thin cutters that can break down these locations - if this location does not pass layers but at one time.





(Because many CAM is no such algorithm - not to break the cutter users are layers - all the model - which increases the receipt of the product at times.)
With a little refinement can be done to to fine milling formed g-code in one pass, but when you approach these "narrow" and "deep" places pictures - special g-codes - to reduce movement speed by XX% ...

I think it is undertaken for the project BlenderŠ”AM. This (free) plug-in for Blender for make g-code.

Now I understand a set of approximation points NURBS splines to modify another script called LinuxCNC autors.py. This script makes g-code (arc and lines) on the set of points, which gives him the image-to-gcode. But the quality of train code does not suit me: geometric lines it does well, but the model with smooth lines - if you closer the g-code in LinuxCNC - you can see the following ...


I plan to make a set point optimization algorithm instead of Douglas-Peusker - NURBS spline approximation algorithm described in documents "Optimal Single Biarc Fitting and its Applications" Hyungjun Park and papper "CAD/CAM interpolation for NURBS path interpolation on PC based real-time numerical control" by M.Leto, R.Licari, E.LoValvo, M.Piacentini...
Last edit: 25 Jul 2014 13:49 by Harmonist.

Please Log in or Create an account to join the conversation.

More
25 Dec 2014 21:28 - 25 Dec 2014 21:36 #54304 by Harmonist
new ver 3.8.7 - look on top post








for comparison - I made in Gimp this picture to show that the regime RMF - is something else than just filter depth images



Function Optimize path:




Last edit: 25 Dec 2014 21:36 by Harmonist. Reason: add some comments

Please Log in or Create an account to join the conversation.

Time to create page: 0.320 seconds
Powered by Kunena Forum