Inkscape Gcodetools plug-in English support forum

cnc-club.ru for English speaking users

What function should we develope next?

Можно выбрать до 5 вариантов ответа

 
 
Результаты голосования

Аватара пользователя
Nick
Мастер
Сообщения: 22776
Зарегистрирован: 23 ноя 2009, 16:45
Репутация: 1735
Заслуга: Developer
Откуда: Gatchina, Saint-Petersburg distr., Russia
Контактная информация:

Inkscape Gcodetools plug-in English support forum

Сообщение Nick »

Generated Gcode in EMC2 (1358217 просмотров) <a class='original' href='./download/file.php?id=508&mode=view' target=_blank>Загрузить оригинал (21.99 КБ)</a>
Generated Gcode in EMC2
TypeExtension of vector
graphics editor Inkscape
DeveloperGcodetools develop team
Written inPython
OSCross-Platform (Windows, Linux, MacOS)
Version1.6.03
LicenseGNU GPL
Downloads7800+

Gcodetools

Gcodetools is a plug-in for Inkscape. It prepares and converts paths from Inkscape to Gcode, using biarc interpolation.
This article is unfinished. You can help cnc-club expanding it.
Screenshots and photos are needed. Please post them at this thread.
Features (для просмотра содержимого нажмите на ссылку)

Features

Preview of the generated Gcode in EMC (1361141 просмотр) <a class='original' href='./download/file.php?id=130&mode=view' target=_blank>Загрузить оригинал (154.76 КБ)</a>
Preview of the generated Gcode in EMC
Gcodetools area pocketing (1347244 просмотра) <a class='original' href='./download/file.php?id=772&mode=view' target=_blank>Загрузить оригинал (147.75 КБ)</a>
Gcodetools area pocketing
Gcodetools lathe (1353565 просмотров) <a class='original' href='./download/file.php?id=642&mode=view' target=_blank>Загрузить оригинал (21.98 КБ)</a>
Gcodetools lathe
Gcodetools engraving by Rene (1353730 просмотров) <a class='original' href='./download/file.php?id=631&mode=view' target=_blank>Загрузить оригинал (233.84 КБ)</a>
Gcodetools engraving by Rene
Bears by Durachko (1289188 просмотров) <a class='original' href='./download/file.php?id=5429&mode=view' target=_blank>Загрузить оригинал (89.93 КБ)</a>
Bears by Durachko
Export to Gcode
  • Export paths to Gcode
  • Using circular (biarc approximation) or straight line interpolation
  • Automatic path subdivision to reach defined tolerance
  • Multiply tool processing
  • Export Gcode in parametric of flat form
  • Including personal headers and footers
  • Choosing units
  • Multi-pass processing
  • Numeric suffix is added to generated files to avoid overwriting
Lathe Gcode
  • Compute trajectories for lathe
  • Fine cut
  • Define fine cut's depth
  • Define fine rounds
  • Two different computation functions for fine cut
  • Standard axis remapping

Path's area processing
  • Building area paths
  • Area paths could be modified
Engraving
  • Building trajectory according to the cutter's shape
  • Defining different cutter's shapes
Tool's library
  • Defining different tool's parameters (diameter, feed, depth step, penetration feed, personal Gcode before/after each path, cutters shape, personal tool's changing Gcode)
  • Tools can be managed by Inkscape's standard procedures (copy, delete, assigned to different layer)
  • Multiply tools processing
Orientation system
  • Applying scale along any axis
  • Apply rotate in the ХY plane
  • Apply translation along any axis
  • Apply transforms according to arbitrary points
Post-processor
  • You can create custom post-processor by writing down the commands or choose from the list of default post-processors
  • Scale and offset Gcode
  • Gcode commands remapping
  • Parameterize Gcode
  • Round floating point values to specified precision
Verifying tools for the scene
  • Select and remove small paths (area artefacts)
  • Tool's alignment check
  • Cutting order check
Plotter cutting
  • Export to Gcode for plotter with tangential knife. Forth axis A is knife's rotation.
Install (для просмотра содержимого нажмите на ссылку)

Install

Windows
Unpack and copy all the files to the following directory Program Files\Inkscape\share\extensions\ and restart inkscape
Linux
Unpack and copy all the files to the following directory /usr/share/inkscape/extensions/ and restart inkscape
Screenshots (для просмотра содержимого нажмите на ссылку)

Screenshots

Gcodetools plug-in tutorial (2600*1300 px png ~ 700Kb) (1361144 просмотра) <a class='original' href='./download/file.php?id=127&mode=view' target=_blank>Загрузить оригинал (752.7 КБ)</a>
Gcodetools plug-in tutorial (2600*1300 px png ~ 700Kb)
Curve to Gcode result (1361150 просмотров) <a class='original' href='./download/file.php?id=103&mode=view' target=_blank>Загрузить оригинал (1023.52 КБ)</a>
Curve to Gcode result
Preview of the generated Gcode in EMC (1361141 просмотр) <a class='original' href='./download/file.php?id=130&mode=view' target=_blank>Загрузить оригинал (154.76 КБ)</a>
Preview of the generated Gcode in EMC
Get latest version (для просмотра содержимого нажмите на ссылку)

Get latest versions

Latest stable version Gcodetools 1.7
gcodetools.tar.gz
Gcodetools 1.7
(75.25 КБ) 103139 скачиваний
Older versions(ver 1.5)
gcodetools-1.6.tar.gz
Gcodetools 1.6
(56.6 КБ) 15530 скачиваний
(ver 1.5)
gcodetools.tar.gz
Gcodetools 1.5
(21.32 КБ) 11070 скачиваний
(ver 1.4)
gcodetools.tar.gz
(14.72 КБ) 27868 скачиваний
(ver 1.2)
extensions.tar.gz
(9.01 КБ) 10878 скачиваний

Dev-version

You can try the newest development version by getting it from github repository https://github.com/cnc-club/gcodetools via web interface or using git clone git@github.com:cnc-club/gcodetools.git .
You'll need to run python create_inx.py to create inx files. After that install procedure is the same with the stable version.

Translations

Gcodetools is included into Inkscape v 0.49 so it will have native translations as other Inkscape's extensions. Until it is released you can use some self made translation packs:
Credits (для просмотра содержимого нажмите на ссылку)

Credits

Developers:
  • Nick Drobchenko (Nick)
  • Vladimir Kalyaev (Dormouse)
  • Henry Nicolas (Alfcnc)
  • Chris Lusby Taylor (ChrisInNewbury)
Translators:
  • John Brooker (greybeard from cnczone.com)
Develop (для просмотра содержимого нажмите на ссылку)

Develop

At the moment following features are being developed:
  • Plasma cutter extension
  • Turning lathe extension
  • Plotter extension
You can help us improve Gcodetools in several ways
  • Writing a report / bug report
  • Improve help and manuals
  • Publish G-codes / SVGs / other code
  • Publish photos / videos
  • Make a bug report
  • Help develop new features
  • Suggest a new feature
Tested on (для просмотра содержимого нажмите на ссылку)

Tested on

Linux
Ubuntu 9.10 14.04 + inkscape 0.48 (older Gcodetools versions also work with 0.46, 0.47)
Windows
Windows XP, Windows Vista, Windows 7 + inkscape 0.46, inkscape 0.47
MacOS
There are some reports on successful work on MacOs.
Аватара пользователя
Nick
Мастер
Сообщения: 22776
Зарегистрирован: 23 ноя 2009, 16:45
Репутация: 1735
Заслуга: Developer
Откуда: Gatchina, Saint-Petersburg distr., Russia
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение Nick »

tomate писал(а):I'll have a look at Bzr to learn how it works.
It is simple until you do not have merges problems. Just use bzr pull lp:gcodetools to get the files and bzr commit + bzr push lp:gcodetools to push the files.
tomate писал(а):Your solution seams powerful, but I am afraid I didn't understand how it works yet. I will do some testing to get it.
it is using lambda function which is defined as:
depth = lambda c,d,s : "function from the Gcodetools"
so if you define it in gcodetools = d it will be
depth = lambda c,d,s : d
i.e. it returns value defined by Orientation points, but you can do something like
c*d+(1-c)*s
then you'll have linear interpolation between surface and depth depending on color intensity.
tomate писал(а):Yes, all the guitar body was made with gcodetools and LinuxCNC.
That's awesome :)!
tomate
Новичок
Сообщения: 13
Зарегистрирован: 01 сен 2012, 22:37
Репутация: 0
Откуда: Nantes, France
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение tomate »

Hi Nick,

OK, I understood the lambda function stuff.
But I think that allowing the user to specify a custom depth to each path using a XML tag would add a more newbie, no-math, option.
The drawback is that it is only accessible with the XML tree editor, that is a big non-dockable window.
It would easier if these custom tags could be accessible in the "Object Properties" window.

Anyway, I made a working version of this feature.
I will try to find the time to push it today.

Tomate
Аватара пользователя
Nick
Мастер
Сообщения: 22776
Зарегистрирован: 23 ноя 2009, 16:45
Репутация: 1735
Заслуга: Developer
Откуда: Gatchina, Saint-Petersburg distr., Russia
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение Nick »

tomate писал(а):It would easier if these custom tags could be accessible in the "Object Properties" window.
There was a kind of feature in Gcodetools which took Object Properties. We can try to use them.
tomate писал(а):Anyway, I made a working version of this feature.
I think the best solution will be adding another argument to that lambda function to make it able to use that defined depth.
I.e. we've got to change this two lines:

Код: Выделить всё

					depth_func = eval('lambda c,d,s: ' + self.options.path_to_gcode_depth_function.strip('"'))				
to
					depth_func = eval('lambda c,d,s,optd: ' + self.options.path_to_gcode_depth_function.strip('"'))
...............				
and 
...............
										 	[id_, depth_func(c,zd,zs), comment],
to 
										 	[id_, depth_func(c,zd,zs,optd), comment],

and define value for opt_d. Then we can just use opt_d as depth_function for your needs.
tomate
Новичок
Сообщения: 13
Зарегистрирован: 01 сен 2012, 22:37
Репутация: 0
Откуда: Nantes, France
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение tomate »

There was a kind of feature in Gcodetools which took Object Properties. We can try to use them.
OK, I found the "get_path_properties" function
So I need to use it to get a "depth:something" in the desciption and affect it to "optd"
Many thanks, I will work on that.
Аватара пользователя
Nick
Мастер
Сообщения: 22776
Зарегистрирован: 23 ноя 2009, 16:45
Репутация: 1735
Заслуга: Developer
Откуда: Gatchina, Saint-Petersburg distr., Russia
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение Nick »

tomate писал(а):depth:something
best way should be to use regular expressions, something like this:

Код: Выделить всё

r = re.match("depth\s*:\s*(\-?[0-9\.]+)",s):
if r:
  depth = float(r.group(1)) 
tomate
Новичок
Сообщения: 13
Зарегистрирован: 01 сен 2012, 22:37
Репутация: 0
Откуда: Nantes, France
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение tomate »

Wow, perfect timing : I was just working on this step !
Thanks :good:
tomate
Новичок
Сообщения: 13
Зарегистрирован: 01 сен 2012, 22:37
Репутация: 0
Откуда: Nantes, France
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение tomate »

Nick писал(а):I think the best solution will be adding another argument to that lambda function to make it able to use that defined depth.
The drawback of using this solution is that we cannot mix paths with "custom depth" and paths with "default depth" ( of the orientation points ) (ie : that have no "custom depth" set )
Аватара пользователя
Nick
Мастер
Сообщения: 22776
Зарегистрирован: 23 ноя 2009, 16:45
Репутация: 1735
Заслуга: Developer
Откуда: Gatchina, Saint-Petersburg distr., Russia
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение Nick »

Then we can do lkie this:

Код: Выделить всё

r = re.match("depth\s*:\s*(\-?[0-9\.]+)",s):
if r:
  depth = float(r.group(1)) 
else: 
  depth = orientation_points_depth
or write in depth function:
optd if optd != None else : d
tomate
Новичок
Сообщения: 13
Зарегистрирован: 01 сен 2012, 22:37
Репутация: 0
Откуда: Nantes, France
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение tomate »

Ok, I got it working.
Ready to commit ...
Just to be sure ( I'm a bit anxious about committing this change, I wouldn't want to break everything ) :

bzr launchpad-login my-id
bzr commit -m "add possibility to specify custom depth in object description" gcodetools-dev.py

That's all ?
Аватара пользователя
Nick
Мастер
Сообщения: 22776
Зарегистрирован: 23 ноя 2009, 16:45
Репутация: 1735
Заслуга: Developer
Откуда: Gatchina, Saint-Petersburg distr., Russia
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение Nick »

tomate писал(а):bzr launchpad-login my-id
this one is usualy needed only once.
tomate писал(а):bzr commit -m "add possibility to specify custom depth in object description" gcodetools-dev.py
You can use just "bzr commit", and it will generate summary and will allow you to add notes.
Then
"bzr push lp:gcodetools" to push the code.
Any way Bazaar has version control, any bad changes can be undone ;)
tomate
Новичок
Сообщения: 13
Зарегистрирован: 01 сен 2012, 22:37
Репутация: 0
Откуда: Nantes, France
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение tomate »

My code is commited.
I hope it worked :hehehe:
Аватара пользователя
Nick
Мастер
Сообщения: 22776
Зарегистрирован: 23 ноя 2009, 16:45
Репутация: 1735
Заслуга: Developer
Откуда: Gatchina, Saint-Petersburg distr., Russia
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение Nick »

Yes, something definitely has being pushed to repository :D.
Unfortunately I can not check it right now.
tomate
Новичок
Сообщения: 13
Зарегистрирован: 01 сен 2012, 22:37
Репутация: 0
Откуда: Nantes, France
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение tomate »

Ahaha, yeah, ***SOMETHING*** has been pushed.
Thanks for your help.
These were the 2 things that I wanted to add to the code.
Now, I will be happy to help on other parts of the code, if you wish, as soon as it is pretty trivial things ( as you may have noticed, I am not a very experienced coder ).

Tomate
Аватара пользователя
Nick
Мастер
Сообщения: 22776
Зарегистрирован: 23 ноя 2009, 16:45
Репутация: 1735
Заслуга: Developer
Откуда: Gatchina, Saint-Petersburg distr., Russia
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение Nick »

The main tast for now is prepare the code for new release. And push it to inkscape's trunk.
But I can not even imagine what is to be done to make it able :).

Another main task is to finish up offset of the biarc curve. It's almost done but there are a number of bugs which are to be fixed. Do you have any knowledge in planar geometry?

And there are some smaller but important tasks - the most main of them is to rewrite the code using new classes Biarc and CSP instead of old csp and biarc functions. This should make the code easier to read and, I think, faster to execute.

And as it was in your case make improvements based on yours (or users) needs.
tomate
Новичок
Сообщения: 13
Зарегистрирован: 01 сен 2012, 22:37
Репутация: 0
Откуда: Nantes, France
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение tomate »

Another main task is to finish up offset of the biarc curve. It's almost done but there are a number of bugs which are to be fixed. Do you have any knowledge in planar geometry?
Well ... I studied maths and physics at the university, but it was 20 years ago. And nowadays, I am not even able to do a divide operation by hand any more :oops:
the most main of them is to rewrite the code using new classes Biarc and CSP instead of old csp and biarc functions.
Maybe I could give a try at it, but I looked at the code this afternoon, and I am not sure I will be able to help ....
I think I should first take back and read again my "Python for the newbie" book :hehehe:
Аватара пользователя
Nick
Мастер
Сообщения: 22776
Зарегистрирован: 23 ноя 2009, 16:45
Репутация: 1735
Заслуга: Developer
Откуда: Gatchina, Saint-Petersburg distr., Russia
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение Nick »

Almost the same thing for me. :)

But if you'll gona need a new function, you'll now you can do it :)!
deece
Новичок
Сообщения: 2
Зарегистрирован: 30 сен 2012, 14:27
Репутация: 0
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение deece »

Attached is a patch which fixes a couple of spelling errors and implements the "spindle rpm" feature.
Вложения
spindle_rpm.zip
(908 байт) 611 скачиваний
Аватара пользователя
Nick
Мастер
Сообщения: 22776
Зарегистрирован: 23 ноя 2009, 16:45
Репутация: 1735
Заслуга: Developer
Откуда: Gatchina, Saint-Petersburg distr., Russia
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение Nick »

Thanks! Will push it into the repo! :good:
alfcnc
Кандидат
Сообщения: 98
Зарегистрирован: 02 апр 2010, 19:10
Репутация: 0
Заслуга: Tester
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение alfcnc »

Hi ! I want try new engraving but after have update my gcodetools extension to last ver 246. I have this error, with engraving or path to gcode.

Traceback (most recent call last):
File "gcodetools-dev.py", line 8175, in <module>
gcodetools.affect()
File "/usr/share/inkscape/extensions/inkex.py", line 215, in affect
self.effect()
File "gcodetools-dev.py", line 8099, in effect
self.path_to_gcode()
File "gcodetools-dev.py", line 5986, in path_to_gcode
gcode += self.generate_gcode(curve, layer, z)
File "gcodetools-dev.py", line 5268, in generate_gcode
if "" != self.tool["spindle rpm"] :
AttributeError: Gcodetools instance has no attribute 'tool'
Аватара пользователя
Nick
Мастер
Сообщения: 22776
Зарегистрирован: 23 ноя 2009, 16:45
Репутация: 1735
Заслуга: Developer
Откуда: Gatchina, Saint-Petersburg distr., Russia
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение Nick »

Fixxed that see Rev. 247, thanks for bug report :)
Ответить

Вернуться в «English forum»