Inkscape for Cutting Design

Skills and Challenges => Discuss Ongoing Projects (Work in Progress) => Topic started by: AAronvb on April 09, 2017, 07:27:32 PM

Title: Steps to creating gcode from svg drawing.
Post by: AAronvb on April 09, 2017, 07:27:32 PM
I Have had a problem determining and or defining the "AREA WIDTH".
I just cant get past this issue to create the gcode. The lines are always outside the object except when area width is "0"

I have deleted all my previous attempts, there not working.

Equipment: Win XP, -3040 Chinese CNC,  parallel port connection and older computer.
All purchased to work with the 3040cnc, then they got smart and converted to USB and made things simpler on newer machines.
it is what it is.
I need help creating a usable SVG.  DFX. or whatever file to properly convert to Gcode to mill one object with 5 parts. I have been doing something wrong and I need to correct the problem.
I have followed the list above enough without success.

Is there a complete step by step from a owner operator SVG or DXF, Not an image, to gcode. I have tried following the image conversion and eliminating the image conversion steps to no end.
I'm not doing it again, until I figure this out.

I'm a little frustrated with this. It can't be this complex, is it?

I can draw my design in 2 minutes now without thinking anymore, Iv'e made it to many times.

I have 1 design and 1 project and no Idea why I can't get it working correctly with all the online tutorials.
Are their settings in inkscape I'm missing?
Doc Properties are set "inch".
Do the conversions work better with MM insted of IN.
If anyone would like to help me past this, Id'e be most happy :2tu:.
Not sure this is the right place for this. so move me if needed Brynn

Created on inkscape.
 [ You are not allowed to view attachments ]
Title: Re: Steps to creating gcode from svg drawing.
Post by: brynn on April 10, 2017, 02:50:01 PM
I wish I could help you SO MUCH!

I don't have a fast answer for you.  If you wanted to spend some time, to help me understand certain things, there's a chance that I might see the answer.  But there's a good chance we'll end up with both of us not knowing what to do.  However, I'm willing to try.

Which tutorials have you followed?

You mentioned "image conversion".  Do you mean using auto trace?  Or did you manually trace?  I'd be glad to check out your SVG file, if you like.  If so, you mentioned needing gcode to mill 5 parts.  I would need to know which parts are which, because your image looks like it has more than 5 objects.

You mentioned following "the list above".  I'm not clear what that means.  I did notice that you posted this in a new topic, even though it sounds like part of the other topic you posted recently.  That's not a huge problem, but let me know if the forum is malfunctioning.

So the list is what you wrote in this message, right?  https://www.inkscapecuttingdesign.com/smf/index.php?topic=1308.msg7160#msg7160  Where did that list come from?

I've started working my way through the list.  I mean with a drawing in Inkscape - just a simple star.   But I see the Gcode Tools > Area dialog has several tabs.  Is that where you're stuck, not knowing what to set in that dialog?  If you know what to set, tell me, and I'll keep working through the list.

For units, I would keep the same units everywhere.  Set Inkscape to whatever units you're going to use in all the dialogs and with the machines.  With the recent new version 0.92.x there is a new DPI.  So if you open a drawing that you made with an older version of Inkscape, you'll need to scale it, to make sure it's the right size.  I seem to recall you started this project some time ago.  So this might be an issue to fix.  Although as far as making a test run, I don't think the DPI change would prevent getting the gcode.  It's just you would end up with either a little bit larger or a little bit smaller result.  (I keep forgetting which way it goes.)

I notice in your signature you've ruled out problems with certain hardware.  Have you ruled it out by being able to use the hardware successfully with other projects?  I would consider that to be stronger evidence, than if you performed some kind of electronic diagnostic on the machines.

And finally, is the problem that you aren't getting any gcode?  Or you're getting gcode, but it's not correct?  Or that you're stuck somewhere in the list of steps?
Title: Re: Steps to creating gcode from svg drawing.
Post by: AAronvb on April 16, 2017, 08:48:22 AM
Last line and deleted the complete message  :f5:

Image conversion, is converting my new SVG image on version 0.92.x to gcode.

I do generate Gcode, but it does not work correctly in Mach3.

The list I have been following is created from here Start stop until I had all the clicks down up to test the code, then he runs it on a shapco machine.
scotlandsimon
https://www.youtube.com/user/scotlandsimon
 
Title: Re: Steps to creating gcode from svg drawing.
Post by: AAronvb on April 16, 2017, 08:50:00 AM
Images.
Calculating surface are with inkscape
 [ You are not allowed to view attachments ]

Title: Re: Steps to creating gcode from svg drawing.
Post by: AAronvb on April 16, 2017, 08:58:29 AM
Rotor parts;1- large circle, 1-small circle, 10 spoke cutout, 36 squares
Ill stick with this design until I sort this problem.
 [ You are not allowed to view attachments ]
Title: Re: Steps to creating gcode from svg drawing.
Post by: AAronvb on April 16, 2017, 09:03:20 AM
Area before
 [ You are not allowed to view attachments ]
Title: Re: Steps to creating gcode from svg drawing.
Post by: AAronvb on April 16, 2017, 09:04:50 AM
Area after
 [ You are not allowed to view attachments ]
Title: Re: Steps to creating gcode from svg drawing.
Post by: AAronvb on April 16, 2017, 09:13:51 AM
gcode fail;
 [ You are not allowed to view attachments ]
11 steps to gcode
 [ You are not allowed to view attachments ]
Orientation points

The Area Input seems to be the biggest fail right now.
So here is a plan,
I'll post, start to finish, one screen shot at a time and figure out where I'm off track.

AAron
Title: Re: Steps to creating gcode from svg drawing.
Post by: brynn on April 17, 2017, 12:14:18 PM
Holy crap!  I can see why you're lost.

The first place I'm stuck is the Area Processing Tutorial.pdf that you provided.

In step 6, it says

Quote
Go to Extensions -> Gcode tools ...
Fill in Tool diameter in the Preferences tab

There is no extension called "Fill" or "Tool diameter" or "preferences"

Even if I read a little further along

Quote
Then go to Area tab, and fill in Area radius.

and choose the Area extension, which does actually have an Area tab, there is no such field as "Area Radius".

There is Area Width.  But most people think of a width as twice the radius.  So do I find the radius (per instructions in the PDF) and multiply by 2?  Or does "Area Radius" really mean "Area Width"?

And then, what to do with the instructions to "fill in tool diameter in preferences"?

As it turns out, there is a Preferences tab in the Area dialog.  But it has no field for tool diameter.

That's absolutely the worst tutorial I've ever seen!  And I've seen a LOT of tutorials!

Since it looks like that tutorial came from the Russian forum, if it were me, I'd go back to them, and ask for clarity.

Don't be intimidated.  Just say 'your tutorial  says "this", but there is no "this"'.  Well, you know what I mean, right?  But don't be intimidated.  If you want, I'll post for you.
Title: Re: Steps to creating gcode from svg drawing.
Post by: AAronvb on April 19, 2017, 06:47:23 AM
I know that this is being used successfully to create gcode and mill projects.
 Almost every tutorial I have found starts with an image and passes right over Area setting with little to no explanation.
I am also using Gcode Version 1.7 not 1.4 and I know the Gcode program file morphed into a more usable program without new - updated tutorials with the new categories not listed in Ver. 1.4 ...

The bit size is, set with the Fill and Stroke-"Stroke Style", bit size .125 in., at least that's the consensus on multiple videos showing how to set bit size with inkscape.
-
I knew I was not that computer illiterate to not be able to follow instructions.
 
Clarification, I would appreciate you asking, mainly because of the clarity you provide when asking questions and giving response. 
I seem to miss the complete question and only get a partial answer and more questions.

I've been a real burnout this last month, disassembling, moving  and rebuilding a farm is a real work out.

This has always been my favorite explanation of setting the AREA :hh:.

""6. Now we have a path of which area we want to cut.
Next we need to calculate paths that will cover the area (these paths will be the cutter's trajectory).
Go to Extensions -> Gcode tools ...
Fill in Tool diameter in the Preferences tab
Then go to Area tab, and fill in Area radius. What is Area radius or how can it been calculated?
First of all Area radius must be in px (pixels) no mater which units you have been selected!
There some ways to calculate Area radius:
The easies way is: find the thickest part of the path and measure it by eye (Joke)
The second easies way is: find the thickest part of the path and measure it with Bizier tool. When you draw a
path with the Bizier tool status bar shows it last segment length.
The hardest way is: convert path to dynamic offset (Ctlr+J), then press F2 and move the control point to make
your path disappear. Then press Ctrl+Shif+X to open XML editor and find there inkscape:radius parameter, it's
value is the exact value that you'll need
So anyway fill in Area radius.
Choose Calculate Area curves at the bottom and press Apply.""
Title: Re: Steps to creating gcode from svg drawing.
Post by: brynn on April 19, 2017, 11:54:27 AM
Ok, after much difficulty logging in (I finally had to use IE - Firefox was blocking me for some security reason, which that site seems packed with security issues).  I made the post:  http://www.cnc-club.ru/forum/viewtopic.php?f=33&t=35&p=353572&sid=9150e7e05d4fae94fa9630033e89031d#p353572

So  :xf1:  and we'll see what they can tell us  :)
Title: Re: Steps to creating gcode from svg drawing.
Post by: AAronvb on April 23, 2017, 07:46:14 AM
Thanks Brynn.  :xf1:
I will keep an eye on this.

The difference in browsers made a real difference in what was stated.
Title: Re: Steps to creating gcode from svg drawing.
Post by: AAronvb on April 23, 2017, 09:27:10 AM
I found this tutorial, Calculate a surface area with Inkscape
http://labellenote.fr/articles.php?lng=en&pg=273
I'm trying it to see if I can get anywhere.

""In the following exemple, it is not a string instrument, but a Cajòn (percussion box), which is supposed to have, according to the plan, a circular sound-hole with a 12 cm diameter.
In my case, I didn't want to have a circular sound-hole, but something more funny, and I went for a footprint shape.
Obviously, the total surface of the holes composing the footprints must be equivalent to a 12cm disk.
1.Calculate the surface that we need to respect  : 12 cm diameter = 113.1 cm². ""



Area Width by the 2 definitions below is a measurement of complete area (LxW) and across the surface at it's widest point, in my case it should be 9 inches, but this also does not work.

Area
ar·e·a
ˈerēə/
noun
1.
a region or part of a town, a country, or the world.
"rural areas of New Jersey"
synonyms:   district, region, zone, sector, quarter, precinct; More
2.
The extent or measurement of a surface or piece of land.
"the area of a triangle"
synonyms:   expanse, extent, size, scope, compass; More


Width
widTH,witTH/Submit
noun
The measurement or extent of something from side to side.
"the yard was about seven feet in width"
synonyms:   breadth, broadness, wideness, thickness, span, diameter, girth
"the width of the river"
a piece of something at its full extent from side to side.
"a single width of hardboard"
the sideways extent of a swimming pool as a measure of the distance swum.

screen shots coming.
Title: Re: Steps to creating gcode from svg drawing.
Post by: brynn on April 23, 2017, 01:19:40 PM
Oh yeah, I was aware of the Measure extension, which can find the area.  But it seems like you'd have to use the Gcode extension, to get the cutting lines.  Because the Measure extension will just give the area -- no cutting lines.

Actually, now that I look more closely at that thread in the cnc-club forum, the last several questions posted there have not been answered.  The last 11 questions have not been answered.  It doesn't look like they pay any attention to it anymore.  The last time a question was answered, was over a year ago.  I might try to PM someone, if it's allowed (I'm not sure, and I don't have IE open at the moment).

I think I'll take another look at your project later today.  Maybe do some more trial and error.  Just using some random numbers, I was able to get reasonable looking cutting lines, the other day.  Not precise for your design, but just for a simple star.  But if I can figure out which values go in which field, then we can plug in the values for your design.
Title: Re: Steps to creating gcode from svg drawing.
Post by: brynn on April 23, 2017, 05:35:14 PM
I might have just had a brilliant idea  :f5:  Well I didn't have it all by myself.  I searched that topic for "area", and found this reply:  http://www.cnc-club.ru/forum/viewtopic.php?f=33&t=35&p=11543&hilit=area#p11543.  It's from 2011, so it probably pertains to an earlier version of the gcode tools, or maybe even a development version.  But there, he's explaining how to make the offset lines (which I assume are the cutting lines).

So I had a thought.  What if we created our own offset lines?  Then it doesn't matter where we put the "Area Radius" or what is "Area Width" or everything in Step 6.  I think the whole reason for Step 6 is to create those offset lines.

Oh, yeah, yeah!  I went back to the list, where the calculating the area is step....well it's also step 6, but it's a different tutorial.  So after that step 6, step 7 is to open takes you through ungrouping the offset paths and getting them ready.

And then after that, step 10 is to open Gcodetools > Path to Gcode.  When I opened it, I noticed that the 3 tabs in that dialog are absolutely identical to the last 3 tabs of the Area dialog.  So I think the first 3 tabs of the Area dialog are for making those offset paths, and the last 3 tabs, which are the same as Path to Gcode, are for creating and outputting the gcode.

So what I'm thinking is to forget about the Area extension dialog completely.  Make your own offset paths, and after they are ready, go to Path to Gcode dialog and enter whatever you need there, and it will create the gcode.

I'm going to work on an example of my own, then I'll show you what I did.  I'm not sure if I will be able to produce gcode, only because I don't know what settings you have on your machines, which the Path to Gcode dialog needs.  But I might guess, since it's just for practice.  I'll post again shortly  :)
Title: Re: Steps to creating gcode from svg drawing.
Post by: brynn on April 23, 2017, 07:42:23 PM
Success!!

I think I've got it.  Here's what I did and results (although of course I have no wood and no machine to cut it).  But I got an NGC file (the gcode) and a log file!

1 -- Extensions menu > Gcodetools > Orientation Points
2 -- Extensions menu > Gcodetools > Tools Library > cylinder

3 -- I drew my own offset paths.  Since the tool diameter is 10, and I thought that meant 10 pixels, but it probably means 10mm, I drew offset paths 10 px apart.  But since there was some mention of overlap somewhere, I made the offset paths 9.5 px apart.  It's a bit of a tedious process, and I can see why they tried to automate it with the first 3 Area dialog tabs.


Here's what it looks like at this point:

 [ You are not allowed to view attachments ]

SVG file:
 [ You are not allowed to view attachments ]

4 -- Extensions menu > Gcodetools > Path to Gcode

Path to Gcode tab
 -- Biarc Interpolation Tolerance - I left it as it was, which is 1.00000
 -- Maximum Splitting Depth - don't know for sure what this is, but based on vague understanding, I changed from  4 to 2
 -- Cutting Order - Subpath by Subpath  (if I didn't Combine the outset paths above, I think I would choose Path by Path -- no clue what "Pass by Pass" means)
 -- Depth Function - d

Options tab
 -- Scale along Z axis - I left it set at 1.00000
 -- Offset along Z axis - I left it set at 0.00000
 -- Select all paths if nothing is selected (since I wasn't sure what to select, I checked this box and let Inkscape select what it needs)
 -- Minimum Arc Radius - I left it at whatever it was, which was either 0.05000 or -0.05000 (sorry I don't remember)
 -- Comment Gcode - I left it blank
 -- Get additional comments - I left it unchecked

Preferences tab
 -- File - I entered a name for the file, with .ngc on the end
 -- Directory - I entered the folder where I wanted the gcode file to be saved
 -- Z safe height - I left it as it was 5.00000
 -- Units - mm
 -- Post-processor - I left it at None
 -- Additional post processing - I left it blank
 -- Generate log file - checked
 -- Path to log file - I entered the path where I wanted to save the log file

Click Apply

Wait several seconds.  And here's what it looks like now

 [ You are not allowed to view attachments ]

SVG file
 [ You are not allowed to view attachments ]

Close up

 [ You are not allowed to view attachments ]

I'm not sure what any of those colors or arrows actually mean.  But if you notice those places where there are a few arrows on one spot.  It's because there are more than one node there.  After using the Path Offsets, you have to do a good deal of cleanup, because it does sometimes put anything between 2, and something like 20 nodes on one spot, or it creates some kind of weird extra subpaths, sometimes. 

Clearly I didn't get everything cleaned up.  So be sure it's all cleaned up and there aren't any random extra subpaths here and there. And for this drawing, make sure all the nodes are smooth, except for those areas that form a v-shape.

In some places  some of the arrows are actually pointing towards each other.  I think it means that there's a tiny loop in the place where a lot of nodes are on top of each other, but I'm not sure.  Or maybe it's because of being corner nodes where they should be smooth.  Or maybe both.  Or maybe the path somehow got broken there??

And here's the NGC file.  I'm not sure if I can upload the log file, since it has no extension.  I guess I could just make it a text file though.

 [ You are not allowed to view attachments ]

 [ You are not allowed to view attachments ]

Ok, so you can see that I made it so that the design (very inspirational blob shape, lol) would be proud, and the wood is cut away around it, because that's at least part of what you're doing, although I'm not sure if all of your project is that way.

I don't know if this would work on your machine.  But I've heard of people who were able to switch out the wood cutting blade for a pen or pencil, and run their file so that it draws on paper for the first test.  So you could use my file for that as a test. 

Although, maybe not, since I used pixels instead of mm.  That probably will throw everying off....  Although on the other hand, it's just a blob anyway.  Maybe measurement isn't all that important for a first try?
Title: Re: Steps to creating gcode from svg drawing.
Post by: AAronvb on April 27, 2017, 07:05:19 AM
I have been busy. I am walking 10 -15 miles a day at work, so I'm just a little tired when I get home.
You have put a lot into this and I greatly appreciate this.
This looks like it will work, so I will start in the morning.  :xf1:

I will start with this object.
This should make a nice 5 blade rotor.
 [ You are not allowed to view attachments ]
Title: Re: Steps to creating gcode from svg drawing.
Post by: AAronvb on April 28, 2017, 07:29:16 AM
I notices my issue with response time. I bookmarked the conversation and found it was not updating with the conversation. Had to go to Home and then back to the conversation to see your response.

I'll be back at this this weekend when I have more time to focus.
Title: Re: Steps to creating gcode from svg drawing.
Post by: brynn on April 30, 2017, 09:51:09 PM
No rush  :)
Title: Re: Steps to creating gcode from svg drawing.
Post by: AAronvb on May 01, 2017, 07:40:00 AM
I started working on this.
I also noticed I have a growing memory retention issue.
I have problems with keeping things in the correct order, so to combat this problem of age, I make step by steps and try to keep them someplace I can't lose them.

So anyway back to the fun.

I set the Doc. Properties to Inch
 [ You are not allowed to view attachments ]
Adjusted the "Z" orientation points. Not sure why it starts this way but I'm sure it is something I did. lol
 [ You are not allowed to view attachments ]
I found (Dynamic Offset) and (Radius) appears in XML editor when pressed, but not the (drag approx distance).
Dynamic Offset - ??drag approx distance??
svg:path ID = (location of Radious in XML editor
 [ You are not allowed to view attachments ]
The list :D
To make sure I actually have this straight.
 [ You are not allowed to view attachments ]

 Again Brynn, thank you for all that you have helped me with I will get this straight.
You know, I can build a round, vertical axis wind turbine with a drill press and table saw, but since my radio shack computer days drawing with Dos doing everything were doing here, this got more difficult, go figure.

Today I'm back to work, building a recreational farm and my 10 -15 mile daily hike at work..
Title: Re: Steps to creating gcode from svg drawing.
Post by: brynn on May 01, 2017, 11:22:30 PM
Yes, I have those same memory problems too!

"drag appox distance"

I guess I left out part of the explanation.  After you do Path menu > Dynamic Offset, you will see that the path looks different.  There are no longer regular nodes, but now there's a single, white, diamond-shaped handle at the top of the path (highest vertical point of the path).

Grab that handle and drag it with the mouse.  Drag it approximately to where you need that offset path to be.  Unfortunately, this is the ONLY way to set precise distance between offset paths.

Use Dynamic Offset, drag the handle until the path is close to what you need....  Actually it doesn't matter if you get it close to what you need or a million miles away.  But you do have to drag is at least a tiny bit, to force the inkscape:radius attribute in the XML Editor to appear.  At least that's what I've been told.  Although it looks from your screenshot like you might be able to set the distance without dragging the path first.

You can try to change that zero to the distance you want.  But if it doesn't work, you'll need to drag the path after all.

It might not be entirely obvious how to set the distance.  Here's how: 

 -- click on inkscape:radius line to select it
 -- look in the section below that.  You'll see the same number there, that you see to the right of "inkscape:radius"
 -- that's the number you need to set
 -- highlight it and type in the right number
 -- click the Set button

Note that if you're dragging the offset path inward, it will be a negative number.

Also, because Dynamic Offset changed it from a regular path to something different, that's why you  have to take the step of Object to Path again, after you set the precise distance, to make it into a regular path once again.

Good luck  :)
Title: Re: Steps to creating gcode from svg drawing.
Post by: AAronvb on May 03, 2017, 07:13:07 AM
Slowly getting there. 
The Dragging makes much more sense now, thank you.
Path-to-gcode unadjusted.
 [ You are not allowed to view attachments ]

The cut line is still off the path in an irregular line.
working on that.

Part description:
 0.5 inch thick aluminum
 I only need 1 offset line.
One inside on the small parts and one on the outside of the whole rotor cut out.  multi layered cut paths to cut out the part.

When I load g-code into Mach 3 Demo, the image is non existent but the code is cutting something.
I believe this is caused from a measurement conflict (MM to IN) in Mach 3. But I'm not sure yet.
Title: Re: Steps to creating gcode from svg drawing.
Post by: AAronvb on May 03, 2017, 07:25:49 AM
I found this in my files.

---- Update 9/1/11 ----

Ok, I've gotten much better at generating accurate part paths and such in inkscape, here's my current workflow:

Create a New Document
Define the document size to be the dimensions of the blank I will use
Create the Object for the EXACT size you want... Essentially just draw anything you want cut.
Do all of this in 1 layer (or a group of layers)
For defining the general outline, I use a fine black line
For defining areas to hog out, I use red transparent
Add orientation points, and define thickness (depth of cut, actually) of material I will use{1}
Add a Cylindrical Cutter tool per set of orientation points.
Change your tool width
Change your feed rate
Change your plunge rate
Change your step (this is the decimal depth to cut per pass)
Create the cutpaths and areas to create said object
Do all of this in a different layer (or set). These layers need orientation points and tools defined.
For cutting around the outside...
Create a copy of the outside path
Redefine the stroke to be your tool width.
This changed your objects width/height. Continue on
Redefine the width/height to be 2x the tool width larger than the desired object(cutting a 1x1 square, with 0.125 tooling, you'd make the width/height 1.25)
The previous step altered your stroke width, repeat the previous 3 steps until this doesn't happen.
For cutting out pieces inside (and all the way through)...
Create a copy of the path.
Redefine the stroke to be your tool width
This changed your objects width/height. Continue on
Redefine the width/height to be the exact size of the hole you want cut out
That altered your stroke width, repeat the previous 3 steps until this doesn't happen
For hogging out areas, I've found 2 methods
gcodetools has a area toolpath calculator. While this works, I've found it finicky.
Linked Offest Paths (more manual work, but better results) I'll detail this in a follow up update.

{1} You must repeat this for each depth you intend to cut. I've not used the variable depth options in gcode tools yet
 [ You are not allowed to view attachments ]
Title: Re: Steps to creating gcode from svg drawing.
Post by: brynn on May 03, 2017, 06:47:53 PM
Can you give me the SVG file of that rotor?  I want to try and figure out why the cut lines are wrong.

I see that you just want to cut that out.  So you don't need the Area extension, or any offset paths, right?  Is this part of the other project - the one with the hearts?  Out of curiosity, what are you making - the round piece with the hearts?

Regarding your note to self.  A lot has changed since 2011, as far as Inkscape's gcodetools extensions.  Have you used the steps in that note?  Do they give a good result?  Well, even if the extensions have changed, you could still use those steps (in your note) that aren't about options in the extension.

Regarding your concerns about mm/inch, I just happened to notice something in this thread, which I couldn't read before.  It's a note you wrote on the SVG file in Inkscape, which you uploaded as a screenshot.  I didn't have my glasses the first time I tried to read it, and it's too small for me to make it out.  But now I've got my glasses and I can read it.

You mentioned that you didn't know what units were being used for the orientation points.  I don't know why they don't have the units printed on the page, along with the number values.  But anyway, in the Orientation Points dialog, it gives you a choice of units (mm or inch).  So you could set it there, to whatever you want.
Title: Re: Steps to creating gcode from svg drawing.
Post by: simonm on May 03, 2017, 09:30:32 PM
If you are just cutting out the full depth with a cylindrical cutter, you can use path_to_gcode, rather than area or engraving features. This tutorial tells you how to compensate for the tool diameter: https://www.shapeoko.com/wiki/index.php/User:BHSPitMonkey/Inkscape_and_Gcodetools_Tutorial (https://www.shapeoko.com/wiki/index.php/User:BHSPitMonkey/Inkscape_and_Gcodetools_Tutorial).

I would also comment that your orientation points show that the stock has a thickness of 0, which should be set to e.g. -6 for 6mm thick material (assuming that you are using a rotary spindle, as opposed to a laser/plasma, but I think you said chinese 3040 CNC so expect you are using a spindle).
Title: Re: Steps to creating gcode from svg drawing.
Post by: brynn 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.
Title: Re: Steps to creating gcode from svg drawing.
Post by: brynn 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/
Title: Re: Steps to creating gcode from svg drawing.
Post by: AAronvb 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.
 [ You are not allowed to view attachments ]
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.
 [ You are not allowed to view attachments ]

Title: Re: Steps to creating gcode from svg drawing.
Post by: AAronvb 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/
Title: Re: Steps to creating gcode from svg drawing.
Post by: AAronvb on May 09, 2017, 07:51:49 AM
 [ You are not allowed to view attachments ]

 [ You are not allowed to view attachments ]
Title: Re: Steps to creating gcode from svg drawing.
Post by: brynn 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.
Title: Re: Steps to creating gcode from svg drawing.
Post by: AAronvb 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.
Title: Re: Steps to creating gcode from svg drawing.
Post by: AAronvb 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.
 
 [ You are not allowed to view attachments ]
 [ You are not allowed to view attachments ]
 [ You are not allowed to view attachments ]
Title: Re: Steps to creating gcode from svg drawing.
Post by: brynn 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  :)

Title: Re: Steps to creating gcode from svg drawing.
Post by: AAronvb 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.

 [ You are not allowed to view attachments ]
Title: Re: Steps to creating gcode from svg drawing.
Post by: brynn 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!
Title: Re: Steps to creating gcode from svg drawing.
Post by: AAronvb 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.
 [ You are not allowed to view attachments ]
except
Gcode cut path looks like a hand drawn pencil line.
 [ You are not allowed to view attachments ]
Title: Re: Steps to creating gcode from svg drawing.
Post by: brynn 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.
Title: Re: Steps to creating gcode from svg drawing.
Post by: AAronvb 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:
Title: Re: Steps to creating gcode from svg drawing.
Post by: brynn on May 24, 2017, 04:12:24 AM
Good luck!

I hope you will make some progress  :)
Title: Re: Steps to creating gcode from svg drawing.
Post by: AAronvb on May 28, 2017, 11:37:35 AM
Progress
 [ You are not allowed to view attachments ]
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. :-$
Title: Re: Steps to creating gcode from svg drawing.
Post by: brynn 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?
Title: Re: Steps to creating gcode from svg drawing.
Post by: AAronvb 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.
 [ You are not allowed to view attachments ]

 [ You are not allowed to view attachments ]  
Title: Re: Steps to creating gcode from svg drawing.
Post by: AAronvb 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.
 [ You are not allowed to view attachments ]
New pre-set document setting. Inch, 1 user unit per inch.
 [ You are not allowed to view attachments ]
Title: Re: Steps to creating gcode from svg drawing.
Post by: brynn 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).