Inkscape and CAM programs

Post Reply
wcpenney
Posts: 6
Joined: Tue Feb 11, 2014 12:50 am

Inkscape and CAM programs

Post by wcpenney » Mon Jan 05, 2015 9:13 pm

GRBL 0.9 is installed and configured, and the machine is trammed up. I finally got my stepper drivers (tb6600 4 axis board), wired em up and smoke tested them. I'm ready to start making stuff. Well... Almost.

I've spend the last few days trying to get a reliable workflow going with SVG files (Inkscape), and testing out various CAM packages (makercam and jscut) with odd results. Generated gcode had weird negative values that I couldn't initially wrap my head around. I didn't want to start sending gcode to my machine (no limit or home switches yet) without being comfortable that I knew what was going to happen.

A little more coffee would have helped as I finally noticed that there was a 12 in offset on the Y axis. I just happened to have created a blank inkscape file set to inch with a 12 x 12 page to use as a template. After a lot of digging around I finally figured out that the Y axis coordinate system in Inkscape is upside down. The ruler shows 0,0 in the lower left, but the SVG file writes with 0,0 in the upper left (as it should according to the SVG spec.) Apparently this bug is something that the inkscape developers have been tiptoeing around for over a decade and inherited from Sodipodi:

https://bugs.launchpad.net/inkscape/+bug/170049
http://saturnboy.com/tag/inkscape/

I can see where this would lead to a lot of initial confusion, and as of 0.48 (the current version for Debian Jessie) it still isn't fixed.

Can someone put a bold red note on the Inkscape wiki entry? The obvious easy workaround is to work from the upper left corner of the page.

Caesar S
Posts: 197
Joined: Mon Sep 29, 2014 7:19 pm
Location: Seattle, WA

Re: Inkscape and CAM programs

Post by Caesar S » Wed Jan 07, 2015 4:47 am

I use Inkscape, set the document properties measurement to what you like. I use mm as I can't figure out inch fractions ...) and select page size. Oddly enough I choose US Letter size here and landscape orientation because I'm familiar with that size.

I draw in InkScape, save it in SVG as the native file format. I then save the drawing as a DXF file and open it in CamBam. I opens up the same way it is laid out in InkScape but aligned to the bottom left of the x y axis.

SmokyRick
Posts: 168
Joined: Sun May 11, 2014 7:22 pm

Re: Inkscape and CAM programs

Post by SmokyRick » Sat Jan 10, 2015 2:20 pm

Just use what you like, but fractions are really easy as a fraction is a division problem. The top number divided by the bottom number. Just when you read a fraction like 3/4 read it as 3 "divided by" 4. That is 0.75. OK enough of the math for nerds. Now we return to your regularly scheduled program.
Smoky Rick
Smoky Rick Crawford in the middle of Northern Illinois, USA.
ShapeOko2 s/n 5200 all stock. Arduino, gshield, Grbl Controller, Autodesk Fusion 360.
Mods: Quiet cut spindle, grbl v0.9g w/ spindle control enabled.

cvoinescu
Posts: 4442
Joined: Thu Jul 19, 2012 6:50 pm
Location: Camberley, UK
Contact:

Re: Inkscape and CAM programs

Post by cvoinescu » Sat Jan 10, 2015 3:05 pm

SmokyRick wrote:Just use what you like, but fractions are really easy as a fraction is a division problem. The top number divided by the bottom number. Just when you read a fraction like 3/4 read it as 3 "divided by" 4. That is 0.75. OK enough of the math for nerds. Now we return to your regularly scheduled program.
That is blindingly obvious, but also very obviously not what Caesar S meant. I'm sure he understands fractions, he's just not familiar with them in a way that makes calculations more or less automatic. When you're not used to fractions, you need to stop and think when you compare or add them. Is 9/64 more or less than 1/4? Or, 3/8 is a bit small for what I need, add 1/64, quickly! As you yourself said, fractions are a "division problem", and you don't want to have to stop to calculate when you think about dimensions. With decimals, the order is obvious even without habit and memorization, and addition and subtraction are easy too, especially if you're used to doing it that way.
Proud owner of ShapeOko #709, eShapeOko #0, and of store.amberspyglass.co.uk

SmokyRick
Posts: 168
Joined: Sun May 11, 2014 7:22 pm

Re: Inkscape and CAM programs

Post by SmokyRick » Sat Jan 10, 2015 3:28 pm

I certainly mean no offense to anyone. Some folks just haven't thought that the line in the fraction means 'divided by'. I tend to be a bit of a teacher now and again and just naturally tell things I have learned that make it easier to understand. If he already knew that then there is nothing lost but my time typing. (Obviously not too much worth there!) If he didn't think of that before, then maybe he (or anyone else looking at this) learned something. WIN!
Smoky
Smoky Rick Crawford in the middle of Northern Illinois, USA.
ShapeOko2 s/n 5200 all stock. Arduino, gshield, Grbl Controller, Autodesk Fusion 360.
Mods: Quiet cut spindle, grbl v0.9g w/ spindle control enabled.

cvoinescu
Posts: 4442
Joined: Thu Jul 19, 2012 6:50 pm
Location: Camberley, UK
Contact:

Re: Inkscape and CAM programs

Post by cvoinescu » Sat Jan 10, 2015 3:33 pm

You mean it's not incredibly obvious that '/' means division? (I admit I can't imagine that, having programmed computers for the last 25 years or so.)
Proud owner of ShapeOko #709, eShapeOko #0, and of store.amberspyglass.co.uk

SmokyRick
Posts: 168
Joined: Sun May 11, 2014 7:22 pm

Re: Inkscape and CAM programs

Post by SmokyRick » Sat Jan 10, 2015 7:56 pm

I regularly work with lots of welders, sheet metal workers, kids just out of high school, and some folks who didn't even get that far. It just comes natural to me to start teaching whenever I have the chance. I can actually remember when I figured out that '/' means divided by, and I was out of high school by that time myself. Of course, that was a few years ago. OK, OK more than a few. I am an old fart and guess I have been for a good while.
Smoky
Smoky Rick Crawford in the middle of Northern Illinois, USA.
ShapeOko2 s/n 5200 all stock. Arduino, gshield, Grbl Controller, Autodesk Fusion 360.
Mods: Quiet cut spindle, grbl v0.9g w/ spindle control enabled.

Harasi
Posts: 49
Joined: Wed Nov 12, 2014 6:48 am

Re: Inkscape and CAM programs

Post by Harasi » Sat Jan 10, 2015 11:34 pm

I have been using my shapeoko 2 (so far stock except for Makita router) for months now & I didn't have any problems or odd results while all my work is designed in inkscape & converted to gcode using makercam. I use cm in both inkscape & makercam.
Shapeoko 2 full kit # unknown .. Makita compact router .. ACME Z axis upgrade kit

wcpenney
Posts: 6
Joined: Tue Feb 11, 2014 12:50 am

Re: Inkscape and CAM programs

Post by wcpenney » Sun Jan 11, 2015 2:35 pm

I think I got some of my gcode exports mixed up. I was trying a bunch of different CAM packages at the same time.

Makercam appears to do some magic to move the origin to the lower left and gets rid of the negative coordinates on the Y axis.

Jscut doesn't do that. I put in a request on the jscut github page asking for a way to set the origin to one of the 4 page corners (it defaults to the upper left.) I also asked for a button to change all coordinates to pos or negative.

Since people are using jscut (I like it quite a bit) how do you setup to use one axis in the negative? I can do a search and replace as a postprocess... I don't have limit/home switches yet.

Edit: It appears that Easel does the same thing as Makercam (translating everything to the lower left with positive coordinates.)

cvoinescu
Posts: 4442
Joined: Thu Jul 19, 2012 6:50 pm
Location: Camberley, UK
Contact:

Re: Inkscape and CAM programs

Post by cvoinescu » Sun Jan 11, 2015 4:49 pm

wcpenney wrote:Since people are using jscut (I like it quite a bit) how do you setup to use one axis in the negative?
You can set the work coordinates however you please. Jog to where you want the G-code origin to be (top-left of your part in your case) and say G10 L20 P1 X0 Y0 Z0. That makes the current point the origin. The setting is stored in EEPROM, so it persists even when you reset or power off the controller. To clear it, G10 L2 P1 X0 Y0 Z0 reverts to machine coordinates. (If you don't have homing switches, the work coordinates don't make much sense. Instead, jog to the part origin and use G92 X0 Y0 Z0. That one isn't persistent.)
Proud owner of ShapeOko #709, eShapeOko #0, and of store.amberspyglass.co.uk

Post Reply