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 (1314974 просмотра) <a class='original' href='./download/file.php?id=508&sid=49409dbdbf38f16625d2ca12c4b1c8ea&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 (1317898 просмотров) <a class='original' href='./download/file.php?id=130&sid=49409dbdbf38f16625d2ca12c4b1c8ea&mode=view' target=_blank>Загрузить оригинал (154.76 КБ)</a>
Preview of the generated Gcode in EMC
Gcodetools area pocketing (1304001 просмотр) <a class='original' href='./download/file.php?id=772&sid=49409dbdbf38f16625d2ca12c4b1c8ea&mode=view' target=_blank>Загрузить оригинал (147.75 КБ)</a>
Gcodetools area pocketing
Gcodetools lathe (1310322 просмотра) <a class='original' href='./download/file.php?id=642&sid=49409dbdbf38f16625d2ca12c4b1c8ea&mode=view' target=_blank>Загрузить оригинал (21.98 КБ)</a>
Gcodetools lathe
Gcodetools engraving by Rene (1310487 просмотров) <a class='original' href='./download/file.php?id=631&sid=49409dbdbf38f16625d2ca12c4b1c8ea&mode=view' target=_blank>Загрузить оригинал (233.84 КБ)</a>
Gcodetools engraving by Rene
Bears by Durachko (1245945 просмотров) <a class='original' href='./download/file.php?id=5429&sid=49409dbdbf38f16625d2ca12c4b1c8ea&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) (1317901 просмотр) <a class='original' href='./download/file.php?id=127&sid=49409dbdbf38f16625d2ca12c4b1c8ea&mode=view' target=_blank>Загрузить оригинал (752.7 КБ)</a>
Gcodetools plug-in tutorial (2600*1300 px png ~ 700Kb)
Curve to Gcode result (1317907 просмотров) <a class='original' href='./download/file.php?id=103&sid=49409dbdbf38f16625d2ca12c4b1c8ea&mode=view' target=_blank>Загрузить оригинал (1023.52 КБ)</a>
Curve to Gcode result
Preview of the generated Gcode in EMC (1317898 просмотров) <a class='original' href='./download/file.php?id=130&sid=49409dbdbf38f16625d2ca12c4b1c8ea&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 КБ) 102093 скачивания
Older versions(ver 1.5)
gcodetools-1.6.tar.gz
Gcodetools 1.6
(56.6 КБ) 14953 скачивания
(ver 1.5)
gcodetools.tar.gz
Gcodetools 1.5
(21.32 КБ) 10533 скачивания
(ver 1.4)
gcodetools.tar.gz
(14.72 КБ) 27079 скачиваний
(ver 1.2)
extensions.tar.gz
(9.01 КБ) 10315 скачиваний

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 Gcode tools plug-in English support forum

Сообщение Nick »

Manual ver. 1.2.

Interface

Options tab
Снимок-GCODE tools.png (114624 просмотра) <a class='original' href='./download/file.php?id=165&sid=49409dbdbf38f16625d2ca12c4b1c8ea&mode=view' target=_blank>Загрузить оригинал (33 КБ)</a>
Scale and offset along axis difines scaling and offsetting along axis. If "Generate not parametric code" is checked all calculations are made in the plug-in and resulting code will be usual plain code, otherwise code will be like :

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

"G03 X[428*#5+#8] Y[-590*#5+#9] Z[-20*#7+#10] I[0*#5] J[45*#5]"
and the header will contain:

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

#4  = 700.000000 (Feed)
#5  = 1.000000 (Scale xy)
#7  = 1.000000 (Scale z)
#8  = -300.000000 (Offset x)
#9  = 300.000000 (Offset y)
#10 = 0.000000 (Offset z)
#11 = 10.000000 (Safe distanse)
In this way it's easier to change computed Gcode with out any additional software, you can just change some values in the header to change the position, scaling factor or feed. So if your controlling software supports calculations inside the code, live "Generate not parametric code" unchecked.

Minimum arc radius is a value of minimum arc radius that can be used during biarc interpolation, all arcs having radius less than this value will be converted to straight lines. EMC2 raises an error if arc radius is less than 0.02mm so this value should not be less than 0.02 (if you are using mm as unit).

Preferences tab
Снимок-GCODE tools-1.png (114624 просмотра) <a class='original' href='./download/file.php?id=166&sid=49409dbdbf38f16625d2ca12c4b1c8ea&mode=view' target=_blank>Загрузить оригинал (32.67 КБ)</a>
File - file name for output.
Directory - Directory for output. If output directory contains 'header' and/or 'footer' file they will be used as header and footer for resulting Gcode.
Attention! You must specify directory in which you have rights to write! (For example my home directory '/home/nick/')
Z safe - Z coordinate for safe traverse above the object.
Z surface - Z coordinate of the surface.
Z depth - Z coordinate of cutting depth.
Z step for each cycle - The increment value for Z axis for each cycle of multi pass cutting.
Feed rate - feed rate in selected units.
Unit - units. Attention! This value affects only one string in Gcode (in the header there wiil be "G21 (All units in mm)" or "G20 (All units in inch)") no additional calculations are made. This plug-in uses Inkscape's native unit - px, so if mm is selected 1px=1mm, if inch is selected 1px=1". So no mater what is selected result's bounds will be the same in units.
Tool diameter - is tool's diameter in units.

Path to Gcode tab
Снимок-GCODE tools-4.png (114624 просмотра) <a class='original' href='./download/file.php?id=167&sid=49409dbdbf38f16625d2ca12c4b1c8ea&mode=view' target=_blank>Загрузить оригинал (23.88 КБ)</a>
Biarc interpolation tolerance - every time the path's segment being approximated by biarc, distance between biarc and path's segment is calculated. If this distance exceeds difened value the segment splits into two segments, and each of them will be approximated separately.
Maximum splitting depth - defines home many times one segment can be splitted.

Area tab
Снимок-GCODE tools-3.png (114624 просмотра) <a class='original' href='./download/file.php?id=168&sid=49409dbdbf38f16625d2ca12c4b1c8ea&mode=view' target=_blank>Загрузить оригинал (23.98 КБ)</a>
Maximum area cutting curve - maximum number of area cutting curves that will be created.
Area radius - the radius of final offset. if in less than 0 the curves will be calculated for outside area.
Аватара пользователя
Nick
Мастер
Сообщения: 22776
Зарегистрирован: 23 ноя 2009, 16:45
Репутация: 1735
Заслуга: Developer
Откуда: Gatchina, Saint-Petersburg distr., Russia
Контактная информация:

Re: Inkscape Gcode tools plug-in English support forum

Сообщение Nick »

Here is an illustration of automatic path subdivision (from ver. 1.2.):
Вложения
g24649.png (114616 просмотров) <a class='original' href='./download/file.php?id=169&sid=49409dbdbf38f16625d2ca12c4b1c8ea&mode=view' target=_blank>Загрузить оригинал (90.88 КБ)</a>
matterantimatter
Новичок
Сообщения: 1
Зарегистрирован: 28 фев 2010, 00:02
Репутация: 0
Контактная информация:

Re: Inkscape Gcode tools plug-in English support forum

Сообщение matterantimatter »

I had this problems with rendered shapes like the gears extension. make sure it's ungrouped and is actually a path, not an object.
Culturedropout писал(а):Well, I don't seem to be getting anything to work. When I set things up as follows and click "Apply" sometimes I get the "working" message for a few seconds, and sometimes I get no action at all. It rarely creates a file, and when it does, I get something like:

%
(Generated by gcode_tools from inkscape.)
M3
G20 (All units in inches)
#4 = 9.000000 (Feed)
#5 = 1.000000 (Scale x)
#6 = 1.000000 (Scale y)
#7 = 1.000000 (Scale z)
#8 = 0.000000 (Offset x)
#9 = 0.000000 (Offset y)
#10 = 0.000000 (Offset z)
#11 = 0.200000 (Safe distanse)
M5
G00 X0.0000 Y0.0000
M2
(end)
%
Screenshot.png
Am I doing something wrong, or is there a problem with the extension? Any help would be appreciated. Thanks.
Аватара пользователя
Nick
Мастер
Сообщения: 22776
Зарегистрирован: 23 ноя 2009, 16:45
Репутация: 1735
Заслуга: Developer
Откуда: Gatchina, Saint-Petersburg distr., Russia
Контактная информация:

Re: Inkscape Gcode tools plug-in English support forum

Сообщение Nick »

I think we should make a little tutorial and highlight this "make sure it's ungrouped and is actually a path, not an object" with colors, big font size and bold font or smf :).
I've made one in Russian language, but it's difficult for me to make it in English. But I promise I'll give a try!
pizza
Новичок
Сообщения: 7
Зарегистрирован: 03 мар 2010, 08:18
Репутация: 0
Контактная информация:

Re: Inkscape Gcode tools plug-in English support forum

Сообщение pizza »

Area to Gcode removed. This function was buggy, it worked to slow and it's results are not editable.
any chance of this being worked on? this function was exactly what i needed.
Аватара пользователя
Nick
Мастер
Сообщения: 22776
Зарегистрирован: 23 ноя 2009, 16:45
Репутация: 1735
Заслуга: Developer
Откуда: Gatchina, Saint-Petersburg distr., Russia
Контактная информация:

Re: Inkscape Gcode tools plug-in English support forum

Сообщение Nick »

pizza писал(а):
Area to Gcode removed. This function was buggy, it worked to slow and it's results are not editable.
any chance of this being worked on? this function was exactly what i needed.

What prevents you using a combination of Calculate area curves + Path to Gcode?
Doing this you will get a group of curves that covers the area, you can easily check for the errors and then convert that curves to Gcode using Path to Gcode.
Note that first picture in the header of the thread it was made by this two functions.
Аватара пользователя
admin
Site Admin
Сообщения: 101
Зарегистрирован: 05 мар 2009, 18:23
Репутация: 54
Заслуга: Developer
Откуда: Gatchina, Saint-Petersburg distr., Russia
Контактная информация:

Re: Inkscape Gcode tools plug-in English support forum

Сообщение admin »

Tutorial 01. Make some gears using Gcode tools and Gear extension.

1. First of all let's draw some gears using Gear extension

Fill in parameters. Note that gear radius depends on Number of teeth and Circular pitch. So if you want your gearbox be 1:5 you should fill in Numbers of teeth 1:5 (12 and 60 for example) other parameters live the same for both gears.
Notice that gears are Group Objects so Ungroup them (Ctrl+Shift+G).
gcode_tools_gear_tutorial_0001.png (114561 просмотр) <a class='original' href='./download/file.php?id=278&sid=49409dbdbf38f16625d2ca12c4b1c8ea&mode=view' target=_blank>Загрузить оригинал (118.56 КБ)</a>

2. Making holes for the roller

Draw the circle with following dimensions 6x6 px.
Attention When Inkscape calculates dimensions it includes stroke width in width and height. So if you want to define exact values remove stroke paint and define values in numerical fields. You can change fill color to see your object.
Make a copy of circle (We have tow gears we need two circles).
Select gear and the circle. Make alignments so circle will be at the center of the gear. (Ctrl+Shift+A -> Center objects horizontally and Center objects vertically).
gcode_tools_gear_tutorial_0002.png (114561 просмотр) <a class='original' href='./download/file.php?id=279&sid=49409dbdbf38f16625d2ca12c4b1c8ea&mode=view' target=_blank>Загрузить оригинал (140.31 КБ)</a>
Press Ctrl+"-" or Path->Difference.
Repeat with the second gear.
gcode_tools_gear_tutorial_0003.png (114561 просмотр) <a class='original' href='./download/file.php?id=280&sid=49409dbdbf38f16625d2ca12c4b1c8ea&mode=view' target=_blank>Загрузить оригинал (137.39 КБ)</a>

3. Let's make some additional holes to make big gear lighter

Draw two circles. And align them to the center of the gear. Make Path->Difference (Ctrl+"-").
Note when you make difference the topmost path subtracts from bottommost. You can use Page Up / Page Down / Home / End to move the path to the top or to the bottom.
gcode_tools_gear_tutorial_0004.png (114561 просмотр) <a class='original' href='./download/file.php?id=281&sid=49409dbdbf38f16625d2ca12c4b1c8ea&mode=view' target=_blank>Загрузить оригинал (143.7 КБ)</a>
gcode_tools_gear_tutorial_0005.png (114561 просмотр) <a class='original' href='./download/file.php?id=282&sid=49409dbdbf38f16625d2ca12c4b1c8ea&mode=view' target=_blank>Загрузить оригинал (143.5 КБ)</a>
Draw a rectangle, align it to the center of the gear. Make a copy of it (Ctrl+D) or just press Space bar when you will rotate/move/scale it. Rotate the copy, press Ctrl while rotating to rotate on exact 90 degrees.
gcode_tools_gear_tutorial_0006.png (114561 просмотр) <a class='original' href='./download/file.php?id=283&sid=49409dbdbf38f16625d2ca12c4b1c8ea&mode=view' target=_blank>Загрузить оригинал (145.05 КБ)</a>
Make a Path->Union (Ctrl+"+") of the rectangles.
gcode_tools_gear_tutorial_0007.png (114561 просмотр) <a class='original' href='./download/file.php?id=284&sid=49409dbdbf38f16625d2ca12c4b1c8ea&mode=view' target=_blank>Загрузить оригинал (144.18 КБ)</a>
Subtract the union from circles.
gcode_tools_gear_tutorial_0008.png (114561 просмотр) <a class='original' href='./download/file.php?id=285&sid=49409dbdbf38f16625d2ca12c4b1c8ea&mode=view' target=_blank>Загрузить оригинал (139.55 КБ)</a>
And finally subtract holes from the gear.
gcode_tools_gear_tutorial_0009.png (114561 просмотр) <a class='original' href='./download/file.php?id=286&sid=49409dbdbf38f16625d2ca12c4b1c8ea&mode=view' target=_blank>Загрузить оригинал (147.56 КБ)</a>

5. Prepare gears for export to Gcode

If you want your gears be precise you should offset the path by 1/2 of tool diameter to material only outside the gear. You can do it in your controlling software or in Inkscape.
So if you want to do it in Inkscape:
Select first gear. Path->Dynamic offset. Then open XML editor (Ctrl+Shift+X) to define exact value.
Set "inkscape:radius" to the tool diameter/2 (for me it's 1.6 because I have 3.2mm cutter).
Note if you use inches instead of mm you should fill in diameter/2 in inches so it will be 0.125 for 1/4 cutter.
gcode_tools_gear_tutorial_0010.png (114561 просмотр) <a class='original' href='./download/file.php?id=287&sid=49409dbdbf38f16625d2ca12c4b1c8ea&mode=view' target=_blank>Загрузить оригинал (105.63 КБ)</a>
Hmmm... It does not look like a good gear, isn't it?
gcode_tools_gear_tutorial_0011.png (114561 просмотр) <a class='original' href='./download/file.php?id=288&sid=49409dbdbf38f16625d2ca12c4b1c8ea&mode=view' target=_blank>Загрузить оригинал (126.12 КБ)</a>
But do not worry it should look like that. To see how your gear will look like after cutting, set fill to some color, stroke to white
and stroke width equals to your cutter diameter. Also set stroke join to round join and stroke cap to round cap.
That's better :).
gcode_tools_gear_tutorial_0012.png (114561 просмотр) <a class='original' href='./download/file.php?id=289&sid=49409dbdbf38f16625d2ca12c4b1c8ea&mode=view' target=_blank>Загрузить оригинал (127.33 КБ)</a>
You cat see that space between teeth become rounded it is because this distance is only 7mm long and cutter diameter is 3.2mm.
Once more do Path->Object to path to make your gears path not dynamic offsets. (For dynamic offset it is not actually needed but it better be done just in case :) )

6. Export to Gcode


Make sure that all objects you want to export are actually Paths.
You can check that all objects are paths at the status bar it mast be like "2 objects of type Path selected".
Ungroup all groups (Ctrl+Shif+G). Convert all objects to paths Path->Object to path (Ctrl+Shift+J). Repeat if needed.
Select paths you want to export. Open Extensions->Gcode tools.
Fill in parameters in Preferences and Path to Gcode tab.
You will need to fill:
  • Filename
  • Directory
  • Z axis parameters
  • Optionally other parameters
gcode_tools_gear_tutorial_0014.png (114561 просмотр) <a class='original' href='./download/file.php?id=291&sid=49409dbdbf38f16625d2ca12c4b1c8ea&mode=view' target=_blank>Загрузить оригинал (120.74 КБ)</a>
Press Apply.
Gcode tools will convert all paths to circular and straight interpolations (G02, G03 and G01), create file containing Gcode + standard header and footer (in there's no "header" and "footer" files in selected directory), create preview of cutting trajectory (red lines - G01, green and blue - G02 and G03).
gcode_tools_gear_tutorial_0015.png (114561 просмотр) <a class='original' href='./download/file.php?id=292&sid=49409dbdbf38f16625d2ca12c4b1c8ea&mode=view' target=_blank>Загрузить оригинал (192.51 КБ)</a>
gear.ngc
Generated Gcode of gears from the tutorial
(52.02 КБ) 3636 скачиваний
Thats it. Work with pleasure :).
pizza
Новичок
Сообщения: 7
Зарегистрирован: 03 мар 2010, 08:18
Репутация: 0
Контактная информация:

Re: Inkscape Gcode tools plug-in English support forum

Сообщение pizza »

root писал(а):
pizza писал(а):
Area to Gcode removed. This function was buggy, it worked to slow and it's results are not editable.
any chance of this being worked on? this function was exactly what i needed.

What prevents you using a combination of Calculate area curves + Path to Gcode?
Doing this you will get a group of curves that covers the area, you can easily check for the errors and then convert that curves to Gcode using Path to Gcode.
Note that first picture in the header of the thread it was made by this two functions.

I've tried following the "GNU logo example", but I don't understand the step that says:
Extensions -> Gcode tools -> Fill Radius for Area Inkscape
and select Prepare for Area Inkscape
Аватара пользователя
Nick
Мастер
Сообщения: 22776
Зарегистрирован: 23 ноя 2009, 16:45
Репутация: 1735
Заслуга: Developer
Откуда: Gatchina, Saint-Petersburg distr., Russia
Контактная информация:

Re: Inkscape Gcode tools plug-in English support forum

Сообщение Nick »

Ok, this is a complex thing, so I'll explain it more carefully.

Calculate area curves function is used to create a number of curves that will cover the area of the selected path.
Those curves are offsets (insets) of the original path with radius equals d/2 +i*d where's d is cutter diameter.
Offset is a function that needs a lot of calculation, especially difficult is clipping offsetted curves. That's why my function worker really slow.
So I've decided to use Inskscape's internal offset function.

Now to the deal :). What do you need to calculate area curves:
  1. First of all get the latest version from the header. (Note that some minor bug's were corrected with out any announcement ;) you can get a new version just in case )
  2. Draw a path.
  3. Make sure that your object is actually a path!
    If it's not do Ungroup (Ctrl+Shift+G), Path->Object to Path (Ctrl+Shift+C) or what ever needed to make your objects be paths!
  4. This step is optional for the last version but some times results could be better if you do this: for each path separately: Path->Dynamic offset (Ctrl+J).
  5. Extensions -> Gcode tools... Now we are almost ready to calculate area curves. Fill in the following parameters:
    • At the Preferences tab
      • Tool diameter. Tool diameter mast be in selected units!
    • At the Area tab
      • Maximum area cutting curves (maximum offsets)- this parameter is needed to eliminate infinite loop or creation of big amount of offsets.
      • Area radius - this parameter defines maximum area radius in pixels (Note that 1 px = 1 unit selected in the Preferences tab with out any conversion).
        How to calculate Area radius? There's a lot of way to do it:
        • Simplest way is to look at the thickest part of the path and imagine it's width in px and divide it by 2 (Joke :). But this is actually a way if you know your objects parameters.)
        • Similar to previous method: look at the thickest part of the path and measure it's width with Besier tool and divide it by 2. (The status bar shows distance in px while you are drawing a path.)
        • Convert your path to Dynamic offset, press F2, move the control point to make your path small and almost disappear. Then pres Ctrl+Shift+X, a XML editor window will be showed, then look at th "inkscape:radius" value - that is exact value that was needed.
    • Select Calculate area curves
  6. And press Apply
That's all. Have fun :).
pizza
Новичок
Сообщения: 7
Зарегистрирован: 03 мар 2010, 08:18
Репутация: 0
Контактная информация:

Re: Inkscape Gcode tools plug-in English support forum

Сообщение pizza »

root писал(а):Ok, this is a complex thing, so I'll explain it more carefully.
thank you for the detailed instructions, i assume at the end i'm supposed to get a gray outline. how do i go from that to a filled-in area? if i take the results of "Calculate area curves" and run "Path to G-Code" on it i get:
Traceback (most recent call last):
File "/usr/share/inkscape/extensions/gcode_tools.py", line 658, in <module>
e.affect()
File "/usr/share/inkscape/extensions/inkex.py", line 154, in affect
self.effect()
File "/usr/share/inkscape/extensions/gcode_tools.py", line 548, in effect
curve = self.parse_curve(p)
File "/usr/share/inkscape/extensions/gcode_tools.py", line 371, in parse_curve
np = [p[0]]
IndexError: list index out of range
Аватара пользователя
Nick
Мастер
Сообщения: 22776
Зарегистрирован: 23 ноя 2009, 16:45
Репутация: 1735
Заслуга: Developer
Откуда: Gatchina, Saint-Petersburg distr., Russia
Контактная информация:

Re: Inkscape Gcode tools plug-in English support forum

Сообщение Nick »

After Calculate area curves you should have a group with several stroked in gray paths.
If it's not to difficult can you post a screenshot please.
And once again :)...
Before using Path to Gcode make sure that selected objects are actually paths!
You can check it in the statusbar. If it's not do Ungroup (Ctrl+Shift+G), Path->Object to Path (Ctrl+Shift+C) or what ever needed to make your objects be paths!
That's my bad, I should make an exception that will notify that one or more of selected objects is not a path...
I think it will be done in next version.
pizza
Новичок
Сообщения: 7
Зарегистрирован: 03 мар 2010, 08:18
Репутация: 0
Контактная информация:

Re: Inkscape Gcode tools plug-in English support forum

Сообщение pizza »

root писал(а):After Calculate area curves you should have a group with several stroked in gray paths.
If it's not to difficult can you post a screenshot please.
And once again :)...
Before using Path to Gcode make sure that selected objects are actually paths!
You can check it in the statusbar. If it's not do Ungroup (Ctrl+Shift+G), Path->Object to Path (Ctrl+Shift+C) or what ever needed to make your objects be paths!
ok, here's me trying to fill in the area of a circular path. i don't just want an outline, i want paths to fill the entire area.

here's my circle, it's a path:
Изображение

all the config info is filled in (tool diameter and all that).
Изображение

ok, now i have a gray outline that's not a path....
Изображение

so i ungroup it...
Изображение

and run object-to-path...
Изображение

now i run path-to-gcode...
Изображение

and i get an outline. the area is not filled in.
Изображение

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

Re: Inkscape Gcode tools plug-in English support forum

Сообщение Nick »

What is the width of this path?
What units are set in the inkscape inches or px or mm?

This plug-in operates with inkscape's internal units px and it does do convert calculations. So if you have chosen inches in plug-in and your object 10px long in inkscape, generated Gcode will be 10inches long!If you select mm it will be 10mm long.

In Russia we use mm, and it's having 1mm=1px is normal because they have similar sizes. And it difficult to me to understand will it be normal for some one who uses inches?
Is it normal if 1px=1inch???

That's why I've asked for advices and suggestions in the header of the topic. It's not to difficult to me to do some corrections but I do not know what to do. ;)

May be your problem that your ellipse is 1x1 inch big and in pixels it's 90x90px. So if you do 1px offset it'll be to small. Try to make your ellipse smaller or offset radius bigger.

By the way thank you for the feedback :)!
If you have some advices about what can be improved it'll be great!!!
pizza
Новичок
Сообщения: 7
Зарегистрирован: 03 мар 2010, 08:18
Репутация: 0
Контактная информация:

Re: Inkscape Gcode tools plug-in English support forum

Сообщение pizza »

root писал(а):What is the width of this path?
What units are set in the inkscape inches or px or mm?
given an area radius of 1 the widths of the *paths* (that is, the "thickness") were:
calculate area curves = 0.356mm
path-to-gcode = 0.569mm

other settings, if they matter:
unit = mm
tool radius = 1

as for general feedback, i think your plug-in shows great promise. it is straight-forward to use (my current area-filling troubles aside ;)), and combined with inkscape gives budding DIY CNCers like myself the opportunity to create useful and beautiful things.

i'm actually a programmer myself (though i only know a little python), i might be able to help. the first thing i'd suggest is that you set up the project in a public repository-type project site such as http://github.com or something similar (http://en.wikipedia.org/wiki/Comparison ... facilities). putting your project in a real version control system has a lot of benefits, and a good site will have bug tracking and other features.
Аватара пользователя
Nick
Мастер
Сообщения: 22776
Зарегистрирован: 23 ноя 2009, 16:45
Репутация: 1735
Заслуга: Developer
Откуда: Gatchina, Saint-Petersburg distr., Russia
Контактная информация:

Re: Inkscape Gcode tools plug-in English support forum

Сообщение Nick »

pizza писал(а):given an area radius of 1 the widths of the *paths* (that is, the "thickness") were:calculate area curves = 0.356mmpath-to-gcode = 0.569mm
Sorry what? My English is not to good.
If you are saying about thickness of paths outline/stroke then it is not what I mean.

The rulers on the screenshot looks like you are using inches as units in the inkscape.
So i thought that your path's widht/height equals to 1x1in. So in px it will be about 90x90 px.
Offset radius measures in px, so offsetting your 90x90 px path by 1 px is not enough to cover the area.

I thought about placing source codes onto one of the open svn's, but it's my first public project.
Now the code being changed every day and almost all versions except releases are not working. Is this situation suitable for putting code to svn, or not?

I've seen your site where your screenshots are posted. There are some interesting thing there. Futurama citations are awesome! :)

We are now developing new function of engraving some patterns with differential depth. I think this function will be ready in a week or two. Due to my English level it's not to easy to make international develop, but all advices are really helpful!
In fact amount of English speaking downloaders is about 4 times higher than Russians one, so it might be more useful to discuss developing in English.
pizza
Новичок
Сообщения: 7
Зарегистрирован: 03 мар 2010, 08:18
Репутация: 0
Контактная информация:

Re: Inkscape Gcode tools plug-in English support forum

Сообщение pizza »

root писал(а):
pizza писал(а):given an area radius of 1 the widths of the *paths* (that is, the "thickness") were:calculate area curves = 0.356mmpath-to-gcode = 0.569mm
Sorry what? My English is not to good.
If you are saying about thickness of paths outline/stroke then it is not what I mean.
well, good news. i'm not sure what i did, but the area-filling now works for me. :D i hate when i don't understand why things work, but i'm happy when they do!

now that i have area filling working, i'm afraid i do have a bug report. i use EMC2 http://www.linuxcnc.org/ for controlling my CNC machine, it's quite decent and the price is right. when i feed it the output of your script i get:
EMC2 error: G-Code error in file: K word given for arc in xy plane
the error message gives a line number, and on that line the g-code generated from my 2-D design contains lines with 6 axis in them in the format:

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

G03 X[...] Y[...] Z[...] I[...] J[...] K[...]
if i delete the part " K[...]" then emc2 accepts the file, but these lines seem broken on the z axis:

x and y coordinates look ok...
Изображение

...but here you can see that the z axis, which should be flat, is clearly broken:
Изображение

any idea why the z axis would change for these particular curves?

concerning subversion or other version management software: yes, it's not hard to work with on a day-to-day basis, even if the code changes frequently (and is frequently broken). but, like all tools, there are good ways to use and it and bad ways. since this is a small project, maybe it's not worth the trouble to use svn right now. it was just a friendly suggestion :)

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

Re: Inkscape Gcode tools plug-in English support forum

Сообщение Nick »

Uppsss :). That's a bug!
This version include new biarc approximation function, that supports differential depth at the ends of the biarc. But unfortunately it has not been tested. :(

So bug was here:

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

gcode_tools.py line 241 was: 
			return biarc(sp1,sp2,depth+1,z1,zm)+biarc(sp2,sp3,depth+1,z1,zm)
and should be:
			return biarc(sp1,sp2,z1,zm,depth+1)+biarc(sp2,sp3,z1,zm,depth+1)
So here's corrected version:
inkscape-extensions.tar.gz
(9.01 КБ) 2824 скачивания
I'll update the header so it will contain correct version.

Btw I'm using EMC2 too, but I'm still a newbie.

Sorry for the delay with the answer, the 8-th of March in "International women's day" in Russia, so I had not a lot of time to read the forum ;).
pizza
Новичок
Сообщения: 7
Зарегистрирован: 03 мар 2010, 08:18
Репутация: 0
Контактная информация:

Re: Inkscape Gcode tools plug-in English support forum

Сообщение pizza »

root писал(а):Uppsss :). That's a bug!

So here's corrected version:
thanks! i wonder how hard it would be to start a simple test suite to protected against regressions...
tony
Новичок
Сообщения: 2
Зарегистрирован: 10 мар 2010, 06:00
Репутация: 0
Контактная информация:

Re: Inkscape Gcode tools plug-in English support forum

Сообщение tony »

This is my first post. I am very happy with this plugin as well. My hat goes of to the coder :D .

well, good news. i'm not sure what i did, but the area-filling now works for me. :D i hate when i don't understand why things work, but i'm happy when they do!

I am an EMC2 user as well and would like to do use the area function but cannot understand it. Could you please post back to the forum how you actually made this work.

One of the interesting things I've found out about inkscape and this plugin is the units. The author recommends to draw in px and then select the units in the G-Code Plugin. I prefer to view my drawing in inches since that is what my machine is configured for. What I do is just put a scaling factor of 1/90 for each of the x and y axis. To set this up I followed the instructions from the website http://www.freesoftwaremagazine.com/boo ... s/inkscape
I then set up the grid (see figure 3). First, I selected File->Document Properties, and set the paper size to US letter and all of the units to “inches”. I then went to the “Grid” tab; started a new “rectangular” grid; and specified minor spacings of 0.05” with major grid lines for every 20 minor lines (which puts the major grid lines on 1” intervals). I then set the colors to something visible enough. Finally, I went to the “Snap” tab; enabled snapping to the grid; and set the sensitivity to the maximum (50 pixels).
Аватара пользователя
Nick
Мастер
Сообщения: 22776
Зарегистрирован: 23 ноя 2009, 16:45
Репутация: 1735
Заслуга: Developer
Откуда: Gatchina, Saint-Petersburg distr., Russia
Контактная информация:

Re: Inkscape Gcode tools plug-in English support forum

Сообщение Nick »

pizza писал(а):
root писал(а):Uppsss :). That's a bug!

So here's corrected version:
thanks! i wonder how hard it would be to start a simple test suite to protected against regressions...
You are welcome :). We just have to eliminate some bugs, that I'm not facing to. I try to imagine some tests but all of them work fine. :)
tony писал(а):This is my first post. I am very happy with this plugin as well. My hat goes of to the coder :D .
Thank's a lot!
I am an EMC2 user as well and would like to do use the area function but cannot understand it. Could you please post back to the forum how you actually made this work.
all you have to do:
1. start thinking in pixels. Start thinking that 1 inch = 1 px
2. Fill in tool diameter.
3. Go to area tab and fill in area radius parameter:
it's area radius in px = area thickest plase in px
you can use Pen (beiser) tool to measure it.
4. Choose Calculate area curves
4. Select your path and press apply.
5. You'll get a group of paths that will cover the area.
Now you can modify them if needed and do ungroup and Path to gcode to export them to Gcode.
One of the interesting things I've found out about inkscape and this plugin is the units. The author recommends to draw in px and then select the units in the G-Code Plugin. I prefer to view my drawing in inches since that is what my machine is configured for. What I do is just put a scaling factor of 1/90 for each of the x and y axis. To set this up I followed the instructions from the website http://www.freesoftwaremagazine.com/boo ... s/inkscape
I then set up the grid (see figure 3). First, I selected File->Document Properties, and set the paper size to US letter and all of the units to “inches”. I then went to the “Grid” tab; started a new “rectangular” grid; and specified minor spacings of 0.05” with major grid lines for every 20 minor lines (which puts the major grid lines on 1” intervals). I then set the colors to something visible enough. Finally, I went to the “Snap” tab; enabled snapping to the grid; and set the sensitivity to the maximum (50 pixels).

About inches:
There are a lot of thin places, for example EMC2 raises an error if arc radius is smaller than .02 mm, but for inches this value is different. I can implement units conversion but we have to describe all thin places first to prevent future bugs.

As for now you can use scaling that provided by the plug-in to convert any units to pixels. And if you'll do it could you write your experience. That will show us a lot of things that have to be done to implement native unit cinversion.

I'm writing this from my phone so excuse my mistakes please ;).
Ответить

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