Gcode for paths
-
- Новичок
- Сообщения: 8
- Зарегистрирован: 06 апр 2011, 14:47
- Репутация: 0
- Контактная информация:
Gcode for paths
Hi,
I have just got the gcodetools working, however there are a few problems. I don't get all the menu options like the manual says. Specifically I can't get anything to change the X and Y shift.
When I output a path of some text into Gcode the straight line stuff works fine but the arc segments look all wrong. For example one line reads:-
G03 X64.156616 Y181.767328 Z-0.900000 I0.334845 J-0.160290
As I understand Gcode the I and J gives the coordinates of the center of the circle. You can see this is a long way off the X & Y which is the end point. The net result on my system is that there are lots of large circles instead of the small arcs making up the path of the letter.
I have the latest 1.6 version and am running Inkscape 0.47 on a Mac.
Any idea what is going on?
Thanks
I have just got the gcodetools working, however there are a few problems. I don't get all the menu options like the manual says. Specifically I can't get anything to change the X and Y shift.
When I output a path of some text into Gcode the straight line stuff works fine but the arc segments look all wrong. For example one line reads:-
G03 X64.156616 Y181.767328 Z-0.900000 I0.334845 J-0.160290
As I understand Gcode the I and J gives the coordinates of the center of the circle. You can see this is a long way off the X & Y which is the end point. The net result on my system is that there are lots of large circles instead of the small arcs making up the path of the letter.
I have the latest 1.6 version and am running Inkscape 0.47 on a Mac.
Any idea what is going on?
Thanks
- Nick
- Мастер
- Сообщения: 22776
- Зарегистрирован: 23 ноя 2009, 16:45
- Репутация: 1735
- Заслуга: Developer
- Откуда: Gatchina, Saint-Petersburg distr., Russia
- Контактная информация:
Re: Gcode for paths
Have you tried or previewed this Gcode?
Yes the radius can be huge, but still arc will be small. It's just a little segment of the big circle. This means that path bends slightly, so to fit it best we have to use segments of big circles. For example straight line is a segment of circle with infinite radius.
About shifting, rotating and scaling. Now Orientation points are used for those purposes. When you apply Path to Gcode, you can notice that two arrows with texts are added to the drawing. They define the Orientation. You can define scaling, rotation and shifting by scaling, rotating and moving those points or changing values of the connected text.
You can make a template drawing, add there orientation points and tool definition and even draw your CNC Machine to be more user readable. Save it to a file for use it as a template for further work.
Yes the radius can be huge, but still arc will be small. It's just a little segment of the big circle. This means that path bends slightly, so to fit it best we have to use segments of big circles. For example straight line is a segment of circle with infinite radius.
About shifting, rotating and scaling. Now Orientation points are used for those purposes. When you apply Path to Gcode, you can notice that two arrows with texts are added to the drawing. They define the Orientation. You can define scaling, rotation and shifting by scaling, rotating and moving those points or changing values of the connected text.
You can make a template drawing, add there orientation points and tool definition and even draw your CNC Machine to be more user readable. Save it to a file for use it as a template for further work.
-
- Новичок
- Сообщения: 8
- Зарегистрирован: 06 апр 2011, 14:47
- Репутация: 0
- Контактная информация:
Re: Gcode for paths
Thanks for that it makes sense with large radius, and small arcs.
Therefore I am inclined to think there is something wrong with my viewing program that is wrong. Do you know of any preview programs that work on a Mac?
I have just tried previewing it. The problem is that I am on a Mac and I don't have any preview applications that work with G2 & G3 codes, therefore I am trying to write my own in processing. This works on the test circles and arcs I put in. However on further investigation it is the G2 commands from the exported code that I am having trouble with. If I just leave the G3 commands in then the output looks reasonable.root писал(а):Have you tried or previewed this Gcode?
Therefore I am inclined to think there is something wrong with my viewing program that is wrong. Do you know of any preview programs that work on a Mac?
- Nick
- Мастер
- Сообщения: 22776
- Зарегистрирован: 23 ноя 2009, 16:45
- Репутация: 1735
- Заслуга: Developer
- Откуда: Gatchina, Saint-Petersburg distr., Russia
- Контактная информация:
Re: Gcode for paths
Good question...
You should look for gcode viewers written in python or java or online ones...
How do you control your cnc from MacOS?
PS are there any win emulators like wine in MacOS?
When you apply Path to Gcode from Gcodetools, A new group is added to the drawing, each piece of it is one of G01 G02 or G03 codes. G01 are red ones. G02 and G03 are blue and green.
You should look for gcode viewers written in python or java or online ones...
How do you control your cnc from MacOS?
PS are there any win emulators like wine in MacOS?
When you apply Path to Gcode from Gcodetools, A new group is added to the drawing, each piece of it is one of G01 G02 or G03 codes. G01 are red ones. G02 and G03 are blue and green.
-
- Новичок
- Сообщения: 8
- Зарегистрирован: 06 апр 2011, 14:47
- Репутация: 0
- Контактная информация:
Re: Gcode for paths
I wrote my own application in Processing:-root писал(а):How do you control your cnc from MacOS?
http://www.thebox.myzen.co.uk/Hardware/ ... rsion.html
I have written several Gcode generators but I want to be able to use a drawing tool like Inkscape to do text and more complex PCBs.
There are but I have not had much luck using them with Gcode viewers. Unfortunately I am not so much a software person and I had great difficulty getting Inkscape running with all the messages saying it was missing extensions. It's like one of those old fashioned adventure games. You can't run this because you haven got that, you go and get that but you can't have it until you get the other and then you need another widget to install it. And so it continues ....root писал(а):are there any win emulators like wine in MacOS
- Nick
- Мастер
- Сообщения: 22776
- Зарегистрирован: 23 ноя 2009, 16:45
- Репутация: 1735
- Заслуга: Developer
- Откуда: Gatchina, Saint-Petersburg distr., Russia
- Контактная информация:
Re: Gcode for paths
If you are fine with G01 codes you can do the folowing:
Select all paths then Extensions - Modify Path - Add nodes. Choose Ditance mode and set up preferred arc length. Apply.
Then press F2 and button which makes segments straight. When you apply Path to Gcode to such path (polyline) there will be only G01.
It's a quick but nasty solution.
Select all paths then Extensions - Modify Path - Add nodes. Choose Ditance mode and set up preferred arc length. Apply.
Then press F2 and button which makes segments straight. When you apply Path to Gcode to such path (polyline) there will be only G01.
It's a quick but nasty solution.
-
- Новичок
- Сообщения: 8
- Зарегистрирован: 06 апр 2011, 14:47
- Репутация: 0
- Контактная информация:
Re: Gcode for paths
Just pressing F2 brings up the path editor. Export of Gcode still has G2 & G3.root писал(а): Then press F2 and button which makes segments straight.
If I select all the paths and hit the make segments straight tool, then try and export the gcode, inkscape brings up a blank dialogue box and crashes ( well after 40 minuites of high speed fan activity I did a force quit ).
So quick and dirty but not a solution.
Most of the other so called Gcode viewers on the Mac have issues. ReplicatorG doesn't show anything from Inkscape exported code even when you remove all the Z commands by hand. Plesent3D will not handle G0 codes let alone G2 & G3.
Anyway thanks for the input.
- Nick
- Мастер
- Сообщения: 22776
- Зарегистрирован: 23 ноя 2009, 16:45
- Репутация: 1735
- Заслуга: Developer
- Откуда: Gatchina, Saint-Petersburg distr., Russia
- Контактная информация:
Re: Gcode for paths
Can you attach your svg file which causes Inkscape crash?
Hmm replicator works on MacOs? I'll check what why it does not work with this Gcode...
I remember that there was a little problem with Replicator on which we've made a little trick .
Hmm replicator works on MacOs? I'll check what why it does not work with this Gcode...
I remember that there was a little problem with Replicator on which we've made a little trick .
-
- Новичок
- Сообщения: 8
- Зарегистрирован: 06 апр 2011, 14:47
- Репутация: 0
- Контактная информация:
Re: Gcode for paths
Ok, file is attached.
Can you look at this code for me. It is the Gcode produced from a simple circle. You will see it has 8 segments. Can you use a Gcode viewer and confirm it is a circle (or ellipse)
It could just be my Inkscape is screwed in some way.
Thanks.
Can you look at this code for me. It is the Gcode produced from a simple circle. You will see it has 8 segments. Can you use a Gcode viewer and confirm it is a circle (or ellipse)
Код: Выделить всё
G00 Z5.100000
G00 X11.570237 Y10.373333
G01 Z-0.025000 F100.0
G02 X10.401668 Y7.552154 Z-0.025000 I-3.989755 J0.000000 F400.000000
G02 X7.580501 Y6.383586 Z-0.025000 I-2.821168 J2.821162
G02 X4.759332 Y7.552154 Z-0.025000 I0.000000 J3.989730
G02 X3.590763 Y10.373333 Z-0.025000 I2.821185 J2.821180
G02 X4.759335 Y13.194496 Z-0.025000 I3.989706 J0.000000
G02 X7.580501 Y14.363052 Z-0.025000 I2.821165 J-2.821193
G02 X10.401665 Y13.194496 Z-0.025000 I0.000000 J-3.989749
G02 X11.570237 Y10.373333 Z-0.025000 I-2.821135 J-2.821163
G01 X11.570237 Y10.373333 Z-0.025000
G00 Z5.100000
Thanks.
- Вложения
-
- Midi Beater engraving.svg
- (12.38 КБ) 1485 скачиваний
- Nick
- Мастер
- Сообщения: 22776
- Зарегистрирован: 23 ноя 2009, 16:45
- Репутация: 1735
- Заслуга: Developer
- Откуда: Gatchina, Saint-Petersburg distr., Russia
- Контактная информация:
Re: Gcode for paths
Got it. To solve ReplicatorG problem see http://cnc-club.ru/forum/viewtopic.php? ... r%2A#p1957
- Nick
- Мастер
- Сообщения: 22776
- Зарегистрирован: 23 ноя 2009, 16:45
- Репутация: 1735
- Заслуга: Developer
- Откуда: Gatchina, Saint-Petersburg distr., Russia
- Контактная информация:
Re: Gcode for paths
I've tried to make midi beater, only with G01.
So firstly I made a union of the paths Ctrl+"+", so it will be easier to work with them,then I added nodes with maximum space 1px. It becomes a path with 1119 nodes. Then F2, Ctrl+A (It took about 4-7 seconds), then made all segments straight. And exported to Gcode (it took 4-5 sec).
Which distance did you define when you did Add nodes? And how many nodes had the path after adding nodes?
Here's ngc file: I must say that 1px is quite small distance, and path will look smooth. Here's a screenshot of remade path:
So firstly I made a union of the paths Ctrl+"+", so it will be easier to work with them,then I added nodes with maximum space 1px. It becomes a path with 1119 nodes. Then F2, Ctrl+A (It took about 4-7 seconds), then made all segments straight. And exported to Gcode (it took 4-5 sec).
Which distance did you define when you did Add nodes? And how many nodes had the path after adding nodes?
Here's ngc file: I must say that 1px is quite small distance, and path will look smooth. Here's a screenshot of remade path:
-
- Новичок
- Сообщения: 8
- Зарегистрирован: 06 апр 2011, 14:47
- Репутация: 0
- Контактная информация:
Re: Gcode for paths
Thanks a lot for that. I have now got the system working for what I want it to do. My main problem was with the I&J absolute / relative mode and the fact that I hadn't appreciated that a G2 & G3 command does not only circular arcs but also helical arcs.
Anyway I have now written a Gcode viewer in Processing so that it is available to anyone on any platform including the Macintosh.
You can down load it from here:- http://www.thebox.myzen.co.uk/Mac_Apps/Processing.html
Anyway I have now written a Gcode viewer in Processing so that it is available to anyone on any platform including the Macintosh.
You can down load it from here:- http://www.thebox.myzen.co.uk/Mac_Apps/Processing.html
- Nick
- Мастер
- Сообщения: 22776
- Зарегистрирован: 23 ноя 2009, 16:45
- Репутация: 1735
- Заслуга: Developer
- Откуда: Gatchina, Saint-Petersburg distr., Russia
- Контактная информация:
Re: Gcode for paths
eeemmm... how to run .pde files?
-
- Новичок
- Сообщения: 8
- Зарегистрирован: 06 апр 2011, 14:47
- Репутация: 0
- Контактная информация:
Re: Gcode for paths
You load in from the Processing language. It's free http://processing.org/Nick писал(а):eeemmm... how to run .pde files?
Best of all it runs on all systems, Mac, PC & linux
Now that I have it running I am having a problem with scale. In inkscape I have a rectangle 0.8" wide by 0.6" high however in the Gcode it comes out at 16.220813 by 12.179534 units. Am I missing something else?
- Nick
- Мастер
- Сообщения: 22776
- Зарегистрирован: 23 ноя 2009, 16:45
- Репутация: 1735
- Заслуга: Developer
- Откуда: Gatchina, Saint-Petersburg distr., Russia
- Контактная информация:
Re: Gcode for paths
Delete all orientation points.
Open Options or Preferences tab in Gcodetools and setup units = inches. (Default units are mm)
Open Options or Preferences tab in Gcodetools and setup units = inches. (Default units are mm)
-
- Новичок
- Сообщения: 8
- Зарегистрирован: 06 апр 2011, 14:47
- Репутация: 0
- Контактная информация:
Re: Gcode for paths
But the rectangle is 20.32 X 15.245 mm when inkscape is set in mm and so is Gcodetools but the gcode outputs 16.220813 by 12.179534.
- Nick
- Мастер
- Сообщения: 22776
- Зарегистрирован: 23 ноя 2009, 16:45
- Репутация: 1735
- Заслуга: Developer
- Откуда: Gatchina, Saint-Petersburg distr., Russia
- Контактная информация:
Re: Gcode for paths
There's one more thing.
There are two way that inkscape can calculate object sizes:
PS Attach your svg, I'll take a look.
There are two way that inkscape can calculate object sizes:
- visual bounding box (the default one)
it will include stroke width, filters like blur and etc. You can see that if you change stroke width or set it to none the size of the object changes. - actual bounding box
Will calculate bounding box on path's node position. It equals to set stroke to none and remove all effects.
PS Attach your svg, I'll take a look.
-
- Новичок
- Сообщения: 5
- Зарегистрирован: 04 янв 2012, 23:34
- Репутация: 0
- Контактная информация:
Re: Gcode for paths
Hi, I am a novice to gcodetools and i am having trouble with the G02 amd G03 codes. I am using 1.7 gcodetools extensions, inkscape 48 and Mach3.
here is a simple elipse path followed by the mach3 screen shot of the gcode here we see arcs allover the place and curves that are probably straight lines Here is the gcode file minimum arc radius = 0.1
biarc intoplation tol = 1
I am really not sure what is going on or what i am doing wrong can you help
here is a simple elipse path followed by the mach3 screen shot of the gcode here we see arcs allover the place and curves that are probably straight lines Here is the gcode file minimum arc radius = 0.1
biarc intoplation tol = 1
I am really not sure what is going on or what i am doing wrong can you help
- Nick
- Мастер
- Сообщения: 22776
- Зарегистрирован: 23 ноя 2009, 16:45
- Репутация: 1735
- Заслуга: Developer
- Откуда: Gatchina, Saint-Petersburg distr., Russia
- Контактная информация:
Re: Gcode for paths
Attach your svg please.
It looks like one of the axis is flipped.
The Gcode seems to be fine, probably there's mach misconfiguration.
Here's an illustration of the first arc:
It looks like one of the axis is flipped.
The Gcode seems to be fine, probably there's mach misconfiguration.
Here's an illustration of the first arc:
-
- Новичок
- Сообщения: 5
- Зарегистрирован: 04 янв 2012, 23:34
- Репутация: 0
- Контактная информация:
Re: Gcode for paths
Many thanks for your reply.
here is the svg file I will look at my Mach configurations.
I really appreciate your help
here is the svg file I will look at my Mach configurations.
I really appreciate your help