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 (1356394 просмотра) <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 (1359318 просмотров) <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 (1345421 просмотр) <a class='original' href='./download/file.php?id=772&mode=view' target=_blank>Загрузить оригинал (147.75 КБ)</a>
Gcodetools area pocketing
Gcodetools lathe (1351742 просмотра) <a class='original' href='./download/file.php?id=642&mode=view' target=_blank>Загрузить оригинал (21.98 КБ)</a>
Gcodetools lathe
Gcodetools engraving by Rene (1351907 просмотров) <a class='original' href='./download/file.php?id=631&mode=view' target=_blank>Загрузить оригинал (233.84 КБ)</a>
Gcodetools engraving by Rene
Bears by Durachko (1287365 просмотров) <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) (1359321 просмотр) <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 (1359327 просмотров) <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 (1359318 просмотров) <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 КБ) 103133 скачивания
Older versions(ver 1.5)
gcodetools-1.6.tar.gz
Gcodetools 1.6
(56.6 КБ) 15526 скачиваний
(ver 1.5)
gcodetools.tar.gz
Gcodetools 1.5
(21.32 КБ) 11068 скачиваний
(ver 1.4)
gcodetools.tar.gz
(14.72 КБ) 27862 скачивания
(ver 1.2)
extensions.tar.gz
(9.01 КБ) 10876 скачиваний

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.
alfcnc
Кандидат
Сообщения: 98
Зарегистрирован: 02 апр 2010, 19:10
Репутация: 0
Заслуга: Tester
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение alfcnc »

For don't lose precision I've see that you put all the with to 0.00 when do offset or area trace..
So i put with of the original path to 0.00 before Stroke to path Ctrl+alt+c and Union and this give good result..
But always no solution to have just outside or inside without doing another boolean after this...
Аватара пользователя
Nick
Мастер
Сообщения: 22776
Зарегистрирован: 23 ноя 2009, 16:45
Репутация: 1735
Заслуга: Developer
Откуда: Gatchina, Saint-Petersburg distr., Russia
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение Nick »

Sorry for not answering for 2 days, I was out of Russia so I was not able to check the forum.

As for the DXF import. I've faced the same problem some weeks ago. It happens because the path is imported divided into the segments. If you try to break it apart with Ctrl+Shift+K, you'll see a lot of small segments.
I've made a small extension to fix it.

But when I've announced it on the linuxgraphics.ru I was told a better solution.
1. Select all the paths.
2. Go to node editing mode F2. And select all the nodes Ctrl+A.
3. Press the button to all separate nodes into one node. This one:
join nodes inkscape dxf import.png
join nodes inkscape dxf import.png (681 байт) 5925 просмотров
So my extension is pointless :lol:.

--------------------------

The latest version is in the first post of this thread. And gcodetools.py file should have this lines at the top:

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

###
###		Gcodetools v 1.6.04 
###
gcodetools_current_version = "1.6.04"
------------------------------

Encoding problem:

Try to put these lines into gcodetools.py (at the top):

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

#!/usr/bin/env python 
# -*- coding: utf-8 -*-
instead of

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

#!/usr/bin/env python 
If it fixes the problem I'll add it to mainstream.
alfcnc
Кандидат
Сообщения: 98
Зарегистрирован: 02 апр 2010, 19:10
Репутация: 0
Заслуга: Tester
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение alfcnc »

For the node joining ! I'll have ever test this method for that's don't work....
It's logical because the join node is just for terminal node ...and if I do select all , middle node are select too and the tool d'ont work....
For it work i must select terminal node manually one by one... very very long work...
I think your extension is not so pointless...
Аватара пользователя
Nick
Мастер
Сообщения: 22776
Зарегистрирован: 23 ноя 2009, 16:45
Репутация: 1735
Заслуга: Developer
Откуда: Gatchina, Saint-Petersburg distr., Russia
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение Nick »

I've just tried it on your path. Select path, F2, Ctrl+A and join.
Works fine:
test_area.svg
(13.44 КБ) 915 скачиваний
What Inkscape version do you have?


Here's my extension if join nodes method does not work:
Вложения
join_paths.tar.gz
(1.96 КБ) 1340 скачиваний
alfcnc
Кандидат
Сообщения: 98
Зарегистрирован: 02 апр 2010, 19:10
Репутация: 0
Заслуга: Tester
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение alfcnc »

Ok !
On inkscape 0.47 that's don't work but on 0.48 Yes works great... and I haven't test this method on 0.48...
very very sad for me ! I'll ve won many hours of works...

Thanks for the extension i'll test it on 0.47 , because it's good for those are always on 0.47

For the encoding !
I have done the change and this don't work... and finally I'm don't know if that come from that..
Because a the end of the error lxml.etree say Document is empty.... so the problem come before lxml work... I'll must set debug mode to find were this crash...
alfcnc
Кандидат
Сообщения: 98
Зарегистрирован: 02 апр 2010, 19:10
Репутация: 0
Заслуга: Tester
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение alfcnc »

Ok !
Your extension Joinpath work very well on 0.47.0-2+b1 on Debian...
alfcnc
Кандидат
Сообщения: 98
Зарегистрирован: 02 апр 2010, 19:10
Репутация: 0
Заслуга: Tester
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение alfcnc »

Could you give some indication how to debug to try to find were is the problem...
alfcnc
Кандидат
Сообщения: 98
Зарегистрирован: 02 апр 2010, 19:10
Репутация: 0
Заслуга: Tester
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение alfcnc »

Hi !
I'll ve path to gcode some path...i'll have a Z safe of 20mm and cuting depht of 5 with Z step of 1...
I path to gcode with ver 1.6.04...
testplunge.svg
(57.51 КБ) 1009 скачиваний
this give me :
testplunge_0001.ngc
(33.47 КБ) 1268 скачиваний
First problem... the plunge speed is set by the tool definition! it's ok.
But when the tools goes from 20mm high to the material the plunge speed must be G00 or it's
G01 all the plunge...
So it's must be go to speed G00 from Z Top rapid move position to Z cut position and then start Cut depth speed...
alfcnc
Кандидат
Сообщения: 98
Зарегистрирован: 02 апр 2010, 19:10
Репутация: 0
Заслуга: Tester
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение alfcnc »

Another problem his if put multiple path whit step plunge cut...
It do first pass of each path and the second one... logical will be make all the pass of one path and
all the cut pass of the others...
If setting all path with a different layer that's make with this order...but curious things... until all depth
cut path the tool return to the Z G00 safe position... interesting when doing drilling but not for milling...
I've see that in dev version you have set some option to choose different logic of cutting pass...well to see.
Аватара пользователя
Nick
Мастер
Сообщения: 22776
Зарегистрирован: 23 ноя 2009, 16:45
Репутация: 1735
Заслуга: Developer
Откуда: Gatchina, Saint-Petersburg distr., Russia
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение Nick »

Hmmmm...

It goes from 20mm to Zcut position with the penetration speed. It's set so because it could be unsafe to go toward the surface at rapid speed.

You can reduce safe distance to reduce the time it takes to penetrate. Or make an replace
"G01 Z[0-9\-\.]+ F100.0" to "G00 Z0 \n \0" using regex.
Also you cat automate this procedure by using post-processor.



To debug what's wring with the lxml try to change inkex.py parse function from /usr/share/inkscape/extensions to something like:

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

   def parse(self,file=None):
        """Parse document in specified file or on stdin"""
    f = open("/home/user/out.txt",'w')
        try:
            try:
                stream = open(file,'r')
                f.write("File from func param %s"%file)
            except:
                stream = open(self.svg_file,'r')
                f.write("File from arg %s"%self.svg_file)
        except:
            stream = sys.stdin
            f.write("File from stdin ")
        f.write("\n\n")
		f.write(stream.readlines())
		f.close()
Replace /home/user to your home dir.

And then look in the out.txt for stream contents.

-------------------------

Yes dev version has some options to order the paths. But still it would go up and down each pass. You can get rid of it by the regex replace/
alfcnc
Кандидат
Сообщения: 98
Зарегистрирован: 02 апр 2010, 19:10
Репутация: 0
Заслуга: Tester
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение alfcnc »

"It goes from 20mm to Zcut position with the penetration speed. It's set so because it could be unsafe to go toward the surface at rapid speed. "

Ok ! but i found this very very curious because the cnc is made for don't error on positionning even if go to G00 speed...So if you have take care of your material width accuracy you set the orientation point with a Z depth that take this security into account...and then you can go to G00 to the top of your material to be cutting...

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

Re: Inkscape Gcodetools plug-in English support forum

Сообщение Nick »

By unsafe I mean there's could be something in the cutters way. Gcodetools does not know anything about the surface except it's path. And it knows that it can move at rapid speed at the safe distance above the surface. So anything below the safe distance should be assumed as "probably cutting" so it should be done with G01. And when it goes down from the safe distance it actually "probably penetrates", so this move should be done at the penetration speed.

That's how I see it.
alfcnc
Кандидат
Сообщения: 98
Зарегистрирован: 02 апр 2010, 19:10
Репутация: 0
Заслуга: Tester
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение alfcnc »

root писал(а):Hmmmm...

It goes from 20mm to Zcut position with the penetration speed. It's set so because it could be unsafe to go toward the surface at rapid speed.

You can reduce safe distance to reduce the time it takes to penetrate. Or make an replace
"G01 Z[0-9\-\.]+ F100.0" to "G00 Z0 \n \0" using regex.
Also you cat automate this procedure by using post-processor.



To debug what's wring with the lxml try to change inkex.py parse function from /usr/share/inkscape/extensions to something like:

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

   def parse(self,file=None):
        """Parse document in specified file or on stdin"""
    f = open("/home/user/out.txt",'w')
        try:
            try:
                stream = open(file,'r')
                f.write("File from func param %s"%file)
            except:
                stream = open(self.svg_file,'r')
                f.write("File from arg %s"%self.svg_file)
        except:
            stream = sys.stdin
            f.write("File from stdin ")
        f.write("\n\n")
		f.write(stream.readlines())
		f.close()
Replace /home/user to your home dir.

And then look in the out.txt for stream contents.

-------------------------

Yes dev version has some options to order the paths. But still it would go up and down each pass. You can get rid of it by the regex replace/
Hum ! I don't understand i have indent error on line with the first " try: "
I have try to change indentation but no result ???
Аватара пользователя
Nick
Мастер
Сообщения: 22776
Зарегистрирован: 23 ноя 2009, 16:45
Репутация: 1735
Заслуга: Developer
Откуда: Gatchina, Saint-Petersburg distr., Russia
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение Nick »

upsss add some spaces before f = open("/home/user/out.txt",'w') to match try.
Look at the /home/user/out.txt. Post it here.
alfcnc
Кандидат
Сообщения: 98
Зарегистрирован: 02 апр 2010, 19:10
Репутация: 0
Заслуга: Tester
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение alfcnc »

Yes ok ! some space here and some on others line...

After try a Pathtogcode the file output contain:

File from arg /tmp/ink_ext_XXXXXX.svg60FNRV

The gcodetools traceback in Inkscape:

Traceback (most recent call last):
File "/usr/share/inkscape/extensions/gcodetools.py", line 4602, in <module>
e.affect()
File "/usr/share/inkscape/extensions/inkex.py", line 221, in affect
self.parse()
File "/usr/share/inkscape/extensions/inkex.py", line 156, in parse
f.write(stream.readlines())
TypeError: argument 1 must be string or read-only character buffer, not list


And the file in tmp is the copy of the file svg i am using in inkscape...
Последний раз редактировалось alfcnc 28 фев 2011, 18:25, всего редактировалось 1 раз.
Аватара пользователя
Nick
Мастер
Сообщения: 22776
Зарегистрирован: 23 ноя 2009, 16:45
Репутация: 1735
Заслуга: Developer
Откуда: Gatchina, Saint-Petersburg distr., Russia
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение Nick »

replace f.write(stream.readlines())
with:
for i in stream.readlines() :
f.write(i)
alfcnc
Кандидат
Сообщения: 98
Зарегистрирован: 02 апр 2010, 19:10
Репутация: 0
Заслуга: Tester
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение alfcnc »

Done : Give traceback:

Traceback (most recent call last):
File "/usr/share/inkscape/extensions/gcodetools.py", line 4602, in <module>
e.affect()
File "/usr/share/inkscape/extensions/inkex.py", line 223, in affect
self.getposinlayer()
File "/usr/share/inkscape/extensions/inkex.py", line 162, in getposinlayer
self.current_layer = self.document.getroot()
AttributeError: 'NoneType' object has no attribute 'getroot

And the output.txt i set in file because long...
debuggcodetools.txt
(12.71 КБ) 1253 скачивания
alfcnc
Кандидат
Сообщения: 98
Зарегистрирован: 02 апр 2010, 19:10
Репутация: 0
Заслуга: Tester
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение alfcnc »

I think start a post for the making of post processor...do you agree...?
Have you some start point to tell me for that ?
Аватара пользователя
Nick
Мастер
Сообщения: 22776
Зарегистрирован: 23 ноя 2009, 16:45
Репутация: 1735
Заслуга: Developer
Откуда: Gatchina, Saint-Petersburg distr., Russia
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение Nick »

It's strange. Why lxml thinks that the tree is empty when it's not...
I'll got to think about it some more :think:
---------------------------

Post-processing theme was opened a while ago:
http://cnc-club.ru/forum/viewtopic.php?f=33&t=78
alfcnc
Кандидат
Сообщения: 98
Зарегистрирован: 02 апр 2010, 19:10
Репутация: 0
Заслуга: Tester
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение alfcnc »

excuse me ! I'haven't see it ...
Ответить

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