Help to a newbie requested (Inkscape and Makercam)

Post Reply
carstenlp
Posts: 5
Joined: Fri Sep 19, 2014 10:35 pm

Help to a newbie requested (Inkscape and Makercam)

Post by carstenlp » Sat Sep 20, 2014 7:13 pm

Hi,

I've just assembled my ShapeOko2 and I've run the hello world program without any issues. I now begun testing Inkscape and Makercam but I've run into an issue with the code from Makercam. I've created a square outlines only in Inkscape that's 50 x 50 mm, moved it to X0 and Y0 axis and saved it as an SVG file. I've then opened Makercam, changed it from inches to mm and edited the preferences regarding the resolution to Inkscape. Then I've imported the SVG file and created a profile operation with the following settings:
Skærmbillede 2014-09-20 kl. 20.43.45.png
Profile settings
Skærmbillede 2014-09-20 kl. 20.43.45.png (43.56 KiB) Viewed 1007 times
Then I've selected Calculate All and Export Gcode and exported the toolpaths. The resulting code looks like this:

(Generated by PartKam Version 0.05)

G21 G90 G40

(profile 1)
G0 Z10
T0 M6
G17
M3
G0 X0.3903553299492386 Y0.3903553299492386
G1 Z-0.1 F800
G1 X49.609137055837564 Y0.3908629441624366 F1500
G1 X49.609137055837564 Y49.609137055837564
G1 X0.3908629441624366 Y49.609137055837564
G1 X0.3908629441624366 Y0.3908629441624366
G0 Z10
M5
M30

I've placed the the bit (a pencil in this case) a hair above the paper as my zero point. With this code the pencil is raised 10mm followed by a move on the Y axis like drawing the first side of the square but in the air at the safety height or it just positions the pencil for the job - I'm not sure. It then drops 0.1 mm as the target depth and starts drawing the rest of the square but it's only drawing three of the sides.

Can anyone explain what's going on? I'm sure it's something basic that I've missed.

The SVG file looks like this:
test firkant.txt
SVG file
(1.73 KiB) Downloaded 61 times
Thank you.

Auzze
Posts: 38
Joined: Thu Sep 05, 2013 8:30 pm
Location: Ballarat, AU

Re: Help to a newbie requested (Inkscape and Makercam)

Post by Auzze » Sat Sep 20, 2014 11:34 pm

HI..

If you change makercam to mm it adds too many digets after the . for each axis

exmaple
G0 X0.3903553299492386 Y0.3903553299492386

Now the problem is that your gcode sender program is getting lost with all them numbers.

So to fix this you can leave it in inches or edit all the numbers so you have only 4 numbers after the .
G0 X0.3903 Y0.3903

You could search for a program that can convert this but you will have to google it.

Auzze
Shapeoko #1996F w/ double MakerSlide (500mm) X-Axis, (750mm) Y upgrades, Acme Screw Z-axis, ¼″ drive shaft, Outside belts, cable drag chain.

http://oz3dprint.info/

philc
Posts: 33
Joined: Fri Aug 29, 2014 5:50 am

Re: Help to a newbie requested (Inkscape and Makercam)

Post by philc » Sun Sep 21, 2014 3:16 am

Here's a windows app I wrote that will round the GCode to three decimal places. I'd run the GCode through a simulator to verify all is well before cutting.

Code:
https://github.com/PhillipC79/GCodeTruncater

Executable:
https://github.com/PhillipC79/GCodeTrun ... eGCode.exe
Shapeoko 2 - CNC Shield & TinyG - 400w spindle - (Sketchup -> CamBam -> GCode Teleporter)
My Software: GCode Teleporter - GCode Truncater
http://www.thingiverse.com/philc

carstenlp
Posts: 5
Joined: Fri Sep 19, 2014 10:35 pm

Re: Help to a newbie requested (Inkscape and Makercam)

Post by carstenlp » Sun Sep 21, 2014 11:39 am

Thank you both for your help. I'll try the tool to remove some of the decimals but in my mind that doesn't really explain the first Y axis move in the air. I've found this thread with a similar issue so I'll be looking into that as well.

http://www.shapeoko.com/forum/viewtopic.php?f=3&t=3987

Thanks again.

dougal
Posts: 31
Joined: Mon Apr 14, 2014 10:15 pm

Re: Help to a newbie requested (Inkscape and Makercam)

Post by dougal » Sun Sep 21, 2014 5:01 pm

carstenlp wrote:but in my mind that doesn't really explain the first Y axis move in the air.
The first move in the air is the machine going to the starting position (on the clearance plane Z10) that is fine and expected, it should be very near to where you zeroed your machine. Only drawing three sides is what Auzze thinks is due to having too much precision in the X and Y coordinates, that tool will remove some decimal places for you, and hopefully stop your shapeoko from choking before it draws the last side of the square.

The thread you linked to was a conflict between absolute vs relative coordinates which the G90 in your gcode fixes, so that is not your problem.

carstenlp
Posts: 5
Joined: Fri Sep 19, 2014 10:35 pm

Re: Help to a newbie requested (Inkscape and Makercam) SOLVE

Post by carstenlp » Mon Sep 22, 2014 3:03 pm

After removing the extra decimals the machine now works as expected. I did try using the program Phil suggested however it gave me an error about some missing statements if I remember it correctly. Since I'm familiar with Notepad++ I ended up with an regular expression that removed all but four decimals from all axis.

Thank you all for your help.

philc
Posts: 33
Joined: Fri Aug 29, 2014 5:50 am

Re: Help to a newbie requested (Inkscape and Makercam)

Post by philc » Mon Sep 22, 2014 3:08 pm

Glad to hear all is working well for you. Sorry my app didn't work out for you.
Shapeoko 2 - CNC Shield & TinyG - 400w spindle - (Sketchup -> CamBam -> GCode Teleporter)
My Software: GCode Teleporter - GCode Truncater
http://www.thingiverse.com/philc

Post Reply