Start by adding nodes and curves and giving shape to the drawing.Ĩ.
It can be used for drawing and not PCB milling.
The converter I wrote also understand the HPGL output of KiCAD. The only trick here that the handling of the multiline string in the.
I wasn't even need code change for this as my pen hadling commands are represented in the configuration file. Adding an M400 command (wait for finish of the previous commands) before an out of order command solve the issue. The answer was much more easier than I ment. I gave up at this point and asked in the Marlin forum.
I was reading the source code of the Marlin for a few hours to find, how to change this behaviour Unsuccessfully. I know about the Marlin firmware that it queue the commands and some commands are executed in order and some out of order. The G code commands are not executed in order. It is the same problem what I mentioned at the beggining of this post (line from the home point to the beggining of the spiral). I known what is the problem, from the first moment. It drawn a 2cm dashed line from the home point towards the starting point of the drawing, then drawn the whole drawing in the air (pen lifted). The reason of this that it was setup in the application config file.Īfter this uploaded it to the Octoprint and sent out to the plotter.
The widely used G code simulator CAMotics Doesn't understand my pen up and down commands, so for the simulation I changed them to G1 Z5 F50 and G1 Z-2 F50 respectively:Īs it looked good, I made the conversion for the plotter:Īs you can see, the PenUp and PenDown parameters are missing here. The usual CNC routers use G1 command to move the Z axis. The reason is the G code of my plotter use M280 P0 S50 command to lift the pen and M280 P0 S0 to put it down. Therefore most of them need to be changed according to the following: The InkScape HPGL save dialog default parameters are mainly setup for cutting and not drawing plotters. It still has some problems like incomplete error handling and lack of path optimization, but does it's job.įirst all of the object in the drawing must be converted to path, otherwise it will not represented in the HPGL output: It is in the github repository of the plotter: After a few trials I gave up to use something I found on the net. This conversion needs some trigonometrical knowledge so it looked hard to achieve for some programmers. Most of them was not able to convert the HPGL AA arcs to G2, G3 gcodes. I searched for a program what is able to convert HPGL to G code. The DXF is a mechanical CAD format, so not really designed for pen plotters, but the HPGL definitely the language of the HP pen plotters. I'll will come back to this issue laterĪt this point I was thinking a bit differently. There is a drawn line between the home point and the start of the spiral what isn't in the original drawing.The plotter needs much simpler gcode than a CNC Router, and the functionality of working with tools, pockets unnecessary at this point.
The DXF2GCODE is more likely a basic CAM software and not just a plug and play conversion solution.I don't know it is just my inability or problem of the software used. I wasn't able to produce correct scaling.As I'm quite familiar with it from my 3D Printing past. Tried to use a few gcode sender, but finally kept using the Rasberry PI/Ubuntu/Octoprint set. I draw that spiral with InkScape, saved as DXF and converted with the DXF2GCODE software from sf.net:
Was done with the following software toolchain: