• June 28, 2017, 06:27:15 AM
• Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: Steps to creating gcode from svg drawing.  (Read 12150 times)

0 Members and 1 Guest are viewing this topic.

Offline brynn

  • Administrator
  • *****
  • Posts: 191
  • Country: us
  • Gender: Female
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 53.0 Firefox 53.0
    • Inkscape Community
Re: Steps to creating gcode from svg drawing.
« Reply #25 on: May 03, 2017, 11:50:55 PM »
Oh wow, a decent tutorial!  Thanks for sharing that  :)

I have to say, I am a little confused about what Aaron wants.  Originally he was cutting out from around a shape, and specifically needed offset cutting lines.  But now we seem to be on a different project, which only needs to be cut out.  Maybe they are part of the same project, I'm not sure.

Offline brynn

  • Administrator
  • *****
  • Posts: 191
  • Country: us
  • Gender: Female
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 53.0 Firefox 53.0
    • Inkscape Community
Re: Steps to creating gcode from svg drawing.
« Reply #26 on: May 03, 2017, 11:56:50 PM »
Also I wanted to post a link to this gcode simulator, which simonm told me about.  You may already have one, but just in case:  http://camotics.org/

Offline AAronvb

  • Jr. Member
  • ***
  • Posts: 30
  • Country: us
  • Gender: Male
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Chrome 49.0.2623.112 Chrome 49.0.2623.112
Re: Steps to creating gcode from svg drawing.
« Reply #27 on: May 08, 2017, 07:43:17 AM »
You have been hard at work. Here is an svg. of of the individual parts of the rotor.
I haven't changes projects, just simplifying to 1 part until we work out the details.
*( inch rotor complete.svg
(31.69 kB - downloaded 11 times)

This in the simplest form is the progect.
1.  9 in aluminum disc x .5 in
some spokes for suport and 36-.51x.51 cube N45 neodymium magnets.
*( inch rotor complete.svg
(31.69 kB - downloaded 11 times)


I have confirmed that, I do not have a Mach3 issue, works great.
 I have confirmed that, I do not have a 3040 cnc problem, works great.
I do  have a problem converting my drawing to gcode with inkscape.

??Area width??

Offline AAronvb

  • Jr. Member
  • ***
  • Posts: 30
  • Country: us
  • Gender: Male
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Chrome 49.0.2623.112 Chrome 49.0.2623.112
Re: Steps to creating gcode from svg drawing.
« Reply #28 on: May 08, 2017, 08:23:42 AM »
When I purchased this CNC, I bought it with everything it required to run including the computer. Now their past the serial port connection and on to usb connections and also operates on more complex system, mine is pentium on XP. 
So the problem arises I can not use the newer simulators because of the limitations of this computer. It's old and its slow. 
Also I wanted to post a link to this gcode simulator, which simonm told me about.  You may already have one, but just in case:  http://camotics.org/
Also I wanted to post a link to this gcode simulator, which simonm told me about.  You may already have one, but just in case:  http://camotics.org/
I have confirmed that, I do not have a Mach3 issue, works great.
 I have confirmed that, I do not have a 3040 cnc problem, works great.
I do  have a problem converting my drawing to gcode with inkscape.

??Area width??

Offline AAronvb

  • Jr. Member
  • ***
  • Posts: 30
  • Country: us
  • Gender: Male
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Chrome 49.0.2623.112 Chrome 49.0.2623.112
Re: Steps to creating gcode from svg drawing.
« Reply #29 on: May 09, 2017, 07:51:49 AM »
9 in. rotor dimentions complete.png
*9 in. rotor dimentions complete.png
(137.19 kB . 1443x813)
(viewed 44 times)


Alternator Turbin placement.JPG
*Alternator Turbin placement.JPG
(58.76 kB . 785x773)
(viewed 44 times)
I have confirmed that, I do not have a Mach3 issue, works great.
 I have confirmed that, I do not have a 3040 cnc problem, works great.
I do  have a problem converting my drawing to gcode with inkscape.

??Area width??

Offline brynn

  • Administrator
  • *****
  • Posts: 191
  • Country: us
  • Gender: Female
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 53.0 Firefox 53.0
    • Inkscape Community
Re: Steps to creating gcode from svg drawing.
« Reply #30 on: May 09, 2017, 12:03:07 PM »
Now I'm confused.  Your last few posts were about a spiky-looking 5 blade object that you called a rotor.  The reason I asked for an SVG file, is so I could try and figure out why your cut lines weren't following the paths in some places. 

But now we're on to something different. Which part of that drawing needs to be cut?  I assume just the outer circle and the inner area -- sort of looks like an old fashioned movie reel - except for the magnets.

Hhm, I couldn't find any minimum requirements for camotics.  But I found in previous releases where there's a stable version for XP.  It might work.  Follow the links:  http://camotics.org/releases/  That's another good thing about open source software -- most of the time you can find and use older versions, if they suit your needs better.

Offline AAronvb

  • Jr. Member
  • ***
  • Posts: 30
  • Country: us
  • Gender: Male
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Chrome 49.0.2623.112 Chrome 49.0.2623.112
Re: Steps to creating gcode from svg drawing.
« Reply #31 on: May 10, 2017, 07:23:18 AM »
Don't be confused, there are 2 different rotors in the this project.

1. One is the magnetic rotor. Pictured below with the measurements.
2. The other is the turbine rotor the, 5 blade thing.
The shapes for these rotors are limitless, so I'm always redrawing something different, for the sake of not being confusing any more, I'll stick to the SVG I posted for you.

The reason I changed images is to simplify the task for me to work out the process and them Back to the main pieces.
The shape, like your blob, is to get to the correct code.

Now I'm confused.  Your last few posts were about a spiky-looking 5 blade object that you called a rotor.  The reason I asked for an SVG file, is so I could try and figure out why your cut lines weren't following the paths in some places. 

I'm in a push to finish building my farm at work for summer crops.
Sorry I'm not 100% in this at the moment, I'm a little burnt at the end of the day, physically and the sun.
I have confirmed that, I do not have a Mach3 issue, works great.
 I have confirmed that, I do not have a 3040 cnc problem, works great.
I do  have a problem converting my drawing to gcode with inkscape.

??Area width??

Offline AAronvb

  • Jr. Member
  • ***
  • Posts: 30
  • Country: us
  • Gender: Male
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Chrome 49.0.2623.112 Chrome 49.0.2623.112
Re: Steps to creating gcode from svg drawing.
« Reply #32 on: May 11, 2017, 07:27:31 AM »
I try
one attempt  in the mornings before getting ready for work.
Today is the for the whole disc with 1 outset line to cut out the disc.
When in Mach 3, the image is not viable and stops at G3.
When I have this correct, I will attempt more lawyers and add parts as I go along.
I am doing this all in mm to try and avoid MM-IN conflicts from inkscape to mach3.
 
start to set INKscape radious.JPG
*start to set INKscape radious.JPG
(180.5 kB . 1280x1024)
(viewed 42 times)

start to set path to gcode.JPG
*start to set path to gcode.JPG
(190.39 kB . 1280x1024)
(viewed 42 times)

start to set gcode.JPG
*start to set gcode.JPG
(277.33 kB . 1280x1024)
(viewed 41 times)
I have confirmed that, I do not have a Mach3 issue, works great.
 I have confirmed that, I do not have a 3040 cnc problem, works great.
I do  have a problem converting my drawing to gcode with inkscape.

??Area width??

Offline brynn

  • Administrator
  • *****
  • Posts: 191
  • Country: us
  • Gender: Female
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 53.0 Firefox 53.0
    • Inkscape Community
Re: Steps to creating gcode from svg drawing.
« Reply #33 on: May 12, 2017, 05:06:36 AM »
I'm not sure what might be causing that error.  When I made a simple circle, and ran it through the process we've been using, my NGC file looks different from yours.  It doesn't even have any G003 (it's all G00, G01 and G02). It goes through the simulation program I mentioned before, without any errors.  I'll attach it here, with the SVG file, in case you want to study it.

Note that I didn't draw a circle, and then make an offset of it, because well, it doesn't make sense.  The tool diameter is taken into account automatically.  So  I just drew a circle.

Maybe when your work settles down a little more, you can put your mind to it again  :)


Offline AAronvb

  • Jr. Member
  • ***
  • Posts: 30
  • Country: us
  • Gender: Male
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Chrome 49.0.2623.112 Chrome 49.0.2623.112
Re: Steps to creating gcode from svg drawing.
« Reply #34 on: May 12, 2017, 06:57:55 AM »
I have been working at the same here.
A 9 in. circle 228.6 mm

The Dynamic Offset = 1/2 the diameter of the bit.
So my understanding is, if the bit is 0.125 in. then half that would be 0.0625, which moves the bit to the outer edge of the 9 in disc. Without the offset the bit cuts out that 0.0625 out of the 9 in. disc leaving it at 8 and 7/8 in.

In Inkscape Radius. I set it to 0.0625 offset.

This attempt seems to be working so far, not sure about accuracy of the size yet. I'll set it to wood tomorrow to verify.
It's to early to see how it works on the CNC, everyone is still asleep.

gcode working circle.JPG
*gcode working circle.JPG
(288.53 kB . 1280x1024)
(viewed 45 times)

I have confirmed that, I do not have a Mach3 issue, works great.
 I have confirmed that, I do not have a 3040 cnc problem, works great.
I do  have a problem converting my drawing to gcode with inkscape.

??Area width??

Offline brynn

  • Administrator
  • *****
  • Posts: 191
  • Country: us
  • Gender: Female
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 53.0 Firefox 53.0
    • Inkscape Community
Re: Steps to creating gcode from svg drawing.
« Reply #35 on: May 12, 2017, 11:45:17 AM »
Well, I don't know.  My understanding is that the gcode is compensating for the tool diameter (and I wouldn't be surprised if it compensates for kerf too) based on the info provided by the choice of tool.  Because you can change the diameter with the Tools Library extension (which makes the green box).  To my understanding, you don't need an offset path at all.

(I do understand your reasoning, and it totally makes sense to the way I learned simple woodworking in college.  You have to do all the measuring and calculating up front -- measure twice, cut once; make a practice run on scraps; do a dry fit before you glue; and all that.  But these days, the way I understand with CNC, the computer does all the calculating.)

But anyway, good luck!

Offline AAronvb

  • Jr. Member
  • ***
  • Posts: 30
  • Country: us
  • Gender: Male
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Chrome 49.0.2623.112 Chrome 49.0.2623.112
Re: Steps to creating gcode from svg drawing.
« Reply #36 on: May 20, 2017, 01:28:10 PM »
Hello,
Brynn, I have been able to generate Gcode successfully with a few issues.
1. When I duplicate the path it looks good.
When I preform the dynamic off set for each individual piece, 3 in and 1 out.
The offset lines are not a duplicate of the path but a much more simplified path that does not match the drawing. This has to be a setting I am missing in inkscape.
2. when I load gcode  to Mach3, the image is microscopic. This I'm sure it is a mm-in-px conflict somewhere that I created.

I am working on this slowly.
Now that I can generate the Gcode again, thank you Brynn, I am working out the settings issues and conflicts to make the shapes work correctly.
 
Path to gcode looks good here.
start to set path to gcode.JPG
*start to set path to gcode.JPG
(190.39 kB . 1280x1024)
(viewed 36 times)

except
Gcode cut path looks like a hand drawn pencil line.
9 in rotor path to gcode irregular.jpg
*9 in rotor path to gcode irregular.jpg
(259.64 kB . 1280x1024)
(viewed 35 times)

I have confirmed that, I do not have a Mach3 issue, works great.
 I have confirmed that, I do not have a 3040 cnc problem, works great.
I do  have a problem converting my drawing to gcode with inkscape.

??Area width??

Offline brynn

  • Administrator
  • *****
  • Posts: 191
  • Country: us
  • Gender: Female
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 53.0 Firefox 53.0
    • Inkscape Community
Re: Steps to creating gcode from svg drawing.
« Reply #37 on: May 21, 2017, 12:04:37 PM »
Well, I'm not sure what to say.  I don't understand #1, about the offset paths not matching the drawing.  For anything with sharp corners, the offset path will never match.  That's because Inkscape's Offset paths make sharp corners rounded.  That's another good reason not to use Inkscape offsets for the cutting path.

For a simple circle, the offset should work fine.  But anything with sharp corners, it probably won't match.   That's why I used that blob shape for testing, earlier, because it has no sharp corners.

Not sure what you mean about the offset being a simplified path.  Usually offsets add more unnecessary nodes, and are not known for being simplified.  (Well technically, it's probably the Object to Path which adds the extra nodes.  But either way the offset paths have extra nodes.)

When you make the offsets, do you remember to use Path menu > Object to Path, before you send to the gcode extension?  If you don't use Object to Path, I'm not sure if the extension will recognize it.  Maybe that's why it looks like a hand drawn circle?

Instead of using offset paths for the cutting path, could you just draw the original object a little bit larger?

Oh!  If you're determined to make the cutting path larger than the original path, here's another way to do it, which doesn't use Offsets at all.  First, duplicate the original path.  Make the stroke wider, to where the outer edge of the stroke is where you want to cut.  Then use Path menu > Stroke to Path.  After that, you'd have to delete the inner path (which is created by stroke to path command).  Then the outer path remains as your cutting path. 

For #2, about the gcode being microscopic, I would look at the zoom level in Inkscape.  If you're drawing while the canvas is at even a moderate zoom, then whatever you draw is much smaller than you planned.  Make sure you're always working at 100% zoom.  Or at least check the zoom before you send to the gcode extension.

Or another thing to check, if you're using Inkscape version 0.92 or higher, and you're opening a file you made with an older version, is the DPI.  If you're opening an old file with 0.92 or higher, the drawing will need to be scaled.  The native resolution of Inkscape changed in 0.92.

Offline AAronvb

  • Jr. Member
  • ***
  • Posts: 30
  • Country: us
  • Gender: Male
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Chrome 49.0.2623.112 Chrome 49.0.2623.112
Re: Steps to creating gcode from svg drawing.
« Reply #38 on: May 22, 2017, 08:18:30 AM »
I will use your suggestions, they work.
I have successfully created and run this on my cnc, I just can't seem to duplicate the code. 
:-$


On a brighter side. I have been offered funding to take my project to the next level. I am talking with friends that can create the gcode on solid works for all the turbine parts. This will take away my frustration for a time while i work out my short comings with inkskape/cnc.  :b1: :hh:

Thank you Brynn, for your help and guidance, it is very appreciated.
I did eliminate all my .svg and .dfx files and start from scratch with a clean inkscape install.  :ur:
I have confirmed that, I do not have a Mach3 issue, works great.
 I have confirmed that, I do not have a 3040 cnc problem, works great.
I do  have a problem converting my drawing to gcode with inkscape.

??Area width??

Offline brynn

  • Administrator
  • *****
  • Posts: 191
  • Country: us
  • Gender: Female
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 53.0 Firefox 53.0
    • Inkscape Community
Re: Steps to creating gcode from svg drawing.
« Reply #39 on: May 24, 2017, 04:12:24 AM »
Good luck!

I hope you will make some progress  :)

Offline AAronvb

  • Jr. Member
  • ***
  • Posts: 30
  • Country: us
  • Gender: Male
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Chrome 49.0.2623.112 Chrome 49.0.2623.112
Re: Steps to creating gcode from svg drawing.
« Reply #40 on: May 28, 2017, 11:37:35 AM »
Progress
It worked.JPG
*It worked.JPG
(211.42 kB . 1280x1024)
(viewed 17 times)

I tried your suggestion of re-sizing the parts to accommodate the bit size instead of the dynamic offsets.

After deleting and reinstalling both programs, I have successfully creating workable code. Mach 3's "user units" was set to micron and I am using inches.
 
I'm going to keep working on the circles a while longer, their not a true circle yet.
then I will try the code on plywood.
Coming soon, you know I'm slow. :-$
I have confirmed that, I do not have a Mach3 issue, works great.
 I have confirmed that, I do not have a 3040 cnc problem, works great.
I do  have a problem converting my drawing to gcode with inkscape.

??Area width??

Offline brynn

  • Administrator
  • *****
  • Posts: 191
  • Country: us
  • Gender: Female
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 53.0 Firefox 53.0
    • Inkscape Community
Re: Steps to creating gcode from svg drawing.
« Reply #41 on: May 29, 2017, 09:40:22 AM »
Well, progress usually comes one step at a time.

I'm not sure if I've ever even heard of microns.  But looking it up, I see it's a metric unit.  Very, very small unit!  No wonder everything was  coming out so tiny!

You probably mentioned this already, and I forgot.  But can your machines use anything else besides gcode?

Offline AAronvb

  • Jr. Member
  • ***
  • Posts: 30
  • Country: us
  • Gender: Male
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Chrome 49.0.2623.112 Chrome 49.0.2623.112
Re: Steps to creating gcode from svg drawing.
« Reply #42 on: June 03, 2017, 01:56:34 PM »
It's a frustration measurement.  :???:
In Mach3 set up manuel pdf

5.3.5.1 Setting Up Encoders
The Counts per unit value should be set to correspond to the resolution of the encoder and your selection
of Native units. For example, a linear scale with rulings at 20 microns produces a count every 5
microns (remember the quadrature signal), or 200 counts per unit (millimeter). If you have Native
units set to inches, then it would be 200 x 25.4 = 5080 counts per unit (inch) because there are 25.4
millimeters per inch. The Velocity value is not used.

I found this while trying to scale my drawing up.
The Rule says on thing and my version, Inkscape 0.92.1 r15371, is the opposite of what I'm reading.

""If the GUI display unit ('inkscape:document-units') identifier is set to "mm" then the GUI would show a width of '25.4' for a rectangle 25.4 user-units wide. If the GUI display unit identifier is set to "in", the GUI would show '1.0'.""

Not sure what to do here. I figured out how to manipulate the "scale" but not the accuracy of the size. I'm also hesitate to try this on my cnc to test the code, just not into breaking it yet.
I am using the Gwizard to view and test the code. It works, except for the size.

As you can see, I can now create and  duplicate the working code. Size is the problem now.
doc properties 1 to 1.JPG
*doc properties 1 to 1.JPG
(168.85 kB . 1280x1024)
(viewed 10 times)


User units.JPG
*User units.JPG
(270.82 kB . 1280x1024)
(viewed 10 times)
« Last Edit: June 03, 2017, 03:17:16 PM by AAronvb »
I have confirmed that, I do not have a Mach3 issue, works great.
 I have confirmed that, I do not have a 3040 cnc problem, works great.
I do  have a problem converting my drawing to gcode with inkscape.

??Area width??

Offline AAronvb

  • Jr. Member
  • ***
  • Posts: 30
  • Country: us
  • Gender: Male
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Chrome 49.0.2623.112 Chrome 49.0.2623.112
Re: Steps to creating gcode from svg drawing.
« Reply #43 on: June 03, 2017, 02:37:52 PM »
I worked my self out of a job so I have a few days to work on this for more than an hour.
I hope this gets me closer to fixing the problem.
User units 2.JPG
*User units 2.JPG
(206.95 kB . 1280x1024)
(viewed 10 times)

New pre-set document setting. Inch, 1 user unit per inch.
pre set document settings..JPG
*pre set document settings..JPG
(161.9 kB . 1280x1024)
(viewed 11 times)
I have confirmed that, I do not have a Mach3 issue, works great.
 I have confirmed that, I do not have a 3040 cnc problem, works great.
I do  have a problem converting my drawing to gcode with inkscape.

??Area width??

Offline brynn

  • Administrator
  • *****
  • Posts: 191
  • Country: us
  • Gender: Female
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 53.0 Firefox 53.0
    • Inkscape Community
Re: Steps to creating gcode from svg drawing.
« Reply #44 on: June 03, 2017, 08:11:19 PM »
I have no idea where that text, titled "Inkscape and Units" comes from, but it's thoroughly confusing!  It seems to be trying to explain what the new Scale factor option is, in Document Properties.

As far as I understand, you only need to be concerned with the Scale factor, if you open a file that you made with an older version of Inkscape, and you want to edit it further.  Unless that's what you're doing, I would ignore it.

I certainly would not use it to scale an image, unless I understood it very well.  I would scale the image on the canvas.

I would certainly rather scale the image on the canvas, than trying to make the machine scale it (if that's what you're doing, I'm not clear).