Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

What's the Best Way to turn OnShape into GCode?

dave_mankoffdave_mankoff Member Posts: 11 ✭✭
Howdy.

I've got a nice little model in OnShape. I need to turn it into GCode instructions for my CNC machine. Anyone have tips or advice for how to go about this?

I'd prefer not to have to drop another couple of hundred dollars on software just for this purpose. Also, major bonus points if the solution is Linux friendly, as I don't have any non-linux boxes available to me.
Tagged:

Answers

  • traveler_hauptmantraveler_hauptman Member, OS Professional, Mentor, Developers Posts: 419 PRO
    You can export sketches and faces as DXF for import into your favorite CAM.

    Select the face or sketch, right click for the context menu, select "export as dxf/dwg".

    This assumes you have been using some CAM software with your CNC machine already...
  • 3dcad3dcad Member, OS Professional, Mentor Posts: 2,475 PRO
    You would need to have access to cam software. All our cnc can import dxf and I just define tools there.

    ps. I tried to google 'Free Cam' without giving a second thought to my keywords. Interesting stuff indeed but not that helpful on this matter =)    
    //rami
  • dave_mankoffdave_mankoff Member Posts: 11 ✭✭
    Yeah, sketches -> dxf is a start, but what about full 3D shapes.

    I see that I can export as STL, but I the options for converting to GCode seem limited at best. I'm curious if other folks have experience with this.
  • _Ðave__Ðave_ Member, Developers Posts: 712 ✭✭✭✭
    For 3d export you have parasolid, step and solidworks you should be able to import those into any cam package.
  • _Ðave__Ðave_ Member, Developers Posts: 712 ✭✭✭✭
    dave_mankoff It might be helpful if you shared a file, Then I could recommend something if I know what you are trying to program.
  • dave_mankoffdave_mankoff Member Posts: 11 ✭✭
    edited May 2015
    @dave_petit Nothing really to share. I'm just playing around with the file that came out of the tutorial. Literally any simple model will suffice.

    I'm simply new to CNC. I have a program that will send GCode to my machine, and I have a model in OnShape. I am trying to figure out translate my model in OnShape into a toolpath/gcode.

    Since I first posted this question, I've tried PyCam, but that was far too slow (on the order of days). I found one called PathCAM, but it fails to run. Everything else I've found uses SVG's which is worthless to me.
  • traveler_hauptmantraveler_hauptman Member, OS Professional, Mentor, Developers Posts: 419 PRO
    @dave_mankoff What do you mean that PyCam was too slow? Are you talking about the time to process the imported file? or the estimated runtime of the gcode?

    If you are new to CNC then I recommend joining whatever community exists around that machine and roll up your sleeves to do some learning. The trade-off for cost is time....

    My CAM software has voice activated automatic processing of all CAD data, but it costs $90/hr to use. :wink: 
  • _Ðave__Ðave_ Member, Developers Posts: 712 ✭✭✭✭
    Dave, regardless of what cam software you use you'll have issues with the gcode output and have to edit it. Therefore I'd take traveler_hauptman's advise and get to know the gcode basics. What type of machine do you have?
  • dave_mankoffdave_mankoff Member Posts: 11 ✭✭
    PyCam estimated several hundred hours to generate the gcode for the model I gave it. Maybe I plugged in funky parameters? I may need to revisit it.

    My machine is the new Shapeoko 3. I've sent a few sample GCode files over and they work great, but I'm anxious to start implementing my own designs.

    I'm playing with MeshCAM right now and it seems to work OK-ish. It has to run through an emulator of sorts for Linux, but it's another $250 to drop if I stick with it.
  • david_sohlstromdavid_sohlstrom Member, Mentor Posts: 159 ✭✭✭
    Dave

    If you want to do 2.5D and simple 3D machining then take a look at CamBam. You can run 40 files before you have to buy the software and it is less than a couple of hundred bucks. I run it on PCs and I am not sure if it will run on a linex box. A cheap PC will run it and the Gcode is just a text file so you should be able to load it to your machine. The only other problem you may have is if there is a post processor for your machine in CamBam.

    If you were to give info on what CNC machine you are using and what control software you are running the machine with this would help the forum members to better help you.

    Dave
    David Sohlstrom

    Ariel, WA
  • dave_mankoffdave_mankoff Member Posts: 11 ✭✭
    My machine is the new Shapeoko 3. I'm using http://chilipeppr.com/ to send over the GCode.
  • david_sohlstromdavid_sohlstrom Member, Mentor Posts: 159 ✭✭✭
    Dave

    Please explain a little further about "I'm using chilipepper to send over the Gcode"

    I run a Tormach 770 that uses Tormachs Path Pilot as the control software. I load a file into my CAM program and work out the best way to machine the part. In my case I may have as many as 10 tool changes. When I am happy with my tool paths I run the post processor that generates the Gcode. Then I transfer the Gcode to a thumb drive and load it into Path Pilot. My machine has no connections to any other machine or the internet.

    I see from looking at the Shapeoko web site that the machine runs on both PC and Mac machines. Does it also run on Linex machines.

    Dave

    David Sohlstrom

    Ariel, WA
  • _Ðave__Ðave_ Member, Developers Posts: 712 ✭✭✭✭
    Appears that the Shapeoko 3 comes with meshcam and 3dCarbide software. They claim there is everything you need certainly meshcam will accept a step file from Onshape, No?
  • david_sohlstromdavid_sohlstrom Member, Mentor Posts: 159 ✭✭✭
    I tried MeshCam some years ago and had a hard time working out my tool paths on it. As I recall it was tailored to doing 3D machining and did not work well for 2.5D machining.
    As far as I know CAM programs require you to tell it what you want to machine and what tool to use and what feed rate to use and what spindle speed to use etc.
    I do not know of a CAM program you load a file into and say go and it spits out the Gcode.

    Do you have any manual machining time under your belt or is this your first forey into machining.

    Dave
    David Sohlstrom

    Ariel, WA
  • dave_mankoffdave_mankoff Member Posts: 11 ✭✭
    Please explain a little further about "I'm using chilipepper to send over the Gcode"

    I take a GCode file and load it into the ChiliPeppr website. Then I pipe that over to my CNC machine. ChiliPeppr really doesn't do much other than send raw GCode commands to the machine.

    I load a file into my CAM program and work out the best way to machine the part. [...] When I am happy with my tool paths I run the post processor that generates the Gcode.

    Yeah, that's the trick. I don't have a program that can do any of that yet. Hence my question.

    Then I transfer the Gcode to a thumb drive and load it into Path Pilot.

    The Shapeoko has a USB port that you must have a computer plugged into to feed GCode. Other than that, it's functionally the same process.

    Appears that the Shapeoko 3 comes with meshcam ...

    Sadly, no. One of the Carbide founders wrote MeshCAM, but the Shapeoko doesn't come with it. The only software they ship with is Carbide Motion, which serves a similar purpose to ChiliPeppr - send over raw GCode commands.


    Thank you all for your help.
  • david_sohlstromdavid_sohlstrom Member, Mentor Posts: 159 ✭✭✭
    Dave

    I checked further on Carbides web site to see if I could find screen shots of Carbide Motion. Even downloaded it but with out a machine for it to connect to I can see nothing.

    What engine are you looking at in the samples.

    Because the Shapeoko is a CNC router It is more suited to 2.5D work in softer materials. If you also had there milling machine you would be able to do more with that machine.  It has a tool setter so you can do multi tool machining.

    Do you have a computer hooked to your router or is the router getting all of it's control from chilipepper online.

    Dave

    David Sohlstrom

    Ariel, WA
  • colemancoleman OS Professional Posts: 244 ✭✭✭
    edited May 2015
    @dave_mankoff can you share your model as a public file?  There are many factors to consider and a model will help. 
    What material is the part you are trying to cut? 
    What CNC machine do you have?  

    There are many people here who are willing to help.  

    EDIT: sorry I should have read the entire thread before posting this question. 
  • dave_mankoffdave_mankoff Member Posts: 11 ✭✭
    edited May 2015
    Ok, time for some clarity.

    I know that I need to provide feed rates, tool shapes, etc to the program. My first question wasn't specific enough: I said I wanted to "turn [my model] into GCode". I didn't mean a simple conversion process. I was simply wondering what software folks used to generate the tool paths.

    People want an example model. Here's a trivial one: https://cad.onshape.com/documents/96243b7c8a394f19af1cb1f5/w/ffaa5d67a1ed447d819abb0f/e/4e3d914049724d2986e284b8. We can assume that I am making it out of solid wood, let's say cherry, and that I have both flat and ball nose mills available to me. 

    I have a Shapeoko 3. It accepts GRBL GCode. It has a computer plugged into it. The software on the computer has the ability to send GCode commands. I do not have a way to generate GCode from my models however.

    I am a hobbyist furniture maker. I do not have previous CNC or machine milling experience.
  • benjamin_23benjamin_23 Member Posts: 1 ✭✭
    EstlCam is the most inexpensive CAM software I know of. If you have a few more dollars, I am partial to Bobcad. If you want free, I think you will need to learn to write g-code, which is very doable for 2D.
  • michael3424michael3424 Member Posts: 688 ✭✭✭✭
    You might also consider products from Vectric - those are popular with woodworkers and the router set.  I think that some/all of their product line does both CAD and CAM, but you might be able to import files from Onshape into them.

    My impression is that STL files are comprised of thousands of meshes - little triangles and other polygons - and these will generate very large CAM files with thousands of small X/Y/Z moves.  That could be very slow in both G-Code generation and execution.  Hopefully someone here will correct me if that is bad info.  If not, you'd be much better off to use STEP, IGES, or one of the proprietary CAD formats as inputs to you CAM program.

    Lastly, it looks like CamBam has a version that runs on Linux, so you should probably check that out as well as @david_sohlstrom suggested.

  • david_sohlstromdavid_sohlstrom Member, Mentor Posts: 159 ✭✭✭
    Dave

    Here is your wood platter exported as a SW file that I loaded to Alibre/geomagic and made a 2D drawing of. Exported the drawing in DXF format and loaded into CamBam. 
    First op is a pocket to the start of the bottom fillet .625 deep with a .5" end mill then profiled the bottom fillet with a .5" ball nose end mill. Next a profile of the top fillet with a .25" radius round over mill. Final a out side profile with a .25" end mill. 

    Next told CamBam to generate Gcode using a linexcnc post.

    Here are the files. Well that did not work none of the file formats are allowed for attachments. send me your Email address at dmsohlATtdsDOTnet


    David Sohlstrom

    Ariel, WA
  • dave_mankoffdave_mankoff Member Posts: 11 ✭✭
    @david_sohlstrom: I genuinely appreciate your offer to help. That was just a demo file I whipped together this morning. I'm not actually trying to make that :). I am more looking for general guidance in the future as I make more models such as that. I'd like to be able to generate the tool paths myself.

    It looks like CamBam might have some level of Linux support. A person I talked to off thread suggested that PyCam should work, but it requires lots of tuning to ensure that it doesn't take days to generate the path.
  • david_sohlstromdavid_sohlstrom Member, Mentor Posts: 159 ✭✭✭
    Dave
    My idea was to let you see the Gcode and how your example looked in CamBam. I did not expect you to run the code.

    I downloaded PyCam and I can tell you from first glance that CamBam is a far better CAM program.

    I will help you in any way I can to get you up to speed with CAM.

    Dave

    David Sohlstrom

    Ariel, WA
  • 3dcad3dcad Member, OS Professional, Mentor Posts: 2,475 PRO
    edited May 2015
    The word cnc can be sometimes a bit misleading as people have different images in their head what the word cnc machine stands for. 

    When I see/hear the word cnc, something like this comes up into my mind:



    Many people think something like this:



    And then there is these:



    And these:



    They all fall under the term cnc machine, this is why it's important to describe questions more than 'How to get model to cnc?'
    I'm not referring to @dave_mankoff 's question but more like a general thought of using the term cnc machine. 



    //rami
  • david_sohlstromdavid_sohlstrom Member, Mentor Posts: 159 ✭✭✭
    I want one of those in the third photo. Only 2 problems 1 the machine is bigger than my whole shop and 2 the mega $ it would cost. :smiley: 

    Dave
    David Sohlstrom

    Ariel, WA
  • george_33george_33 Member Posts: 1
    You might want to import your project to Fusion 360, it is free and has CAM. Bit of a learning curve but with the youtube videos they have I have found it pretty easy to do the basics so far.
  • julian_toddjulian_todd Member Posts: 5
    Fusion 360 (if you can import an OnShape file into it) is probably the best bet at the moment.  There's a cheap (free) license for it, so you can make toolpaths.  This creates high performance G-code good for industry machines using the same kernel as HSMWorks (which is an add-on to SolidWorks).  The learning curve is not too desperate.  [full disclosure: I wrote a lot of the maths behind the kernel before it was bought by Autodesk.]

    There's very little in the way of open source CAM that actually works.  (I hope to help do something about this one day.)

    Another way to get G-code fast is to drop your STL file into a free software package called Cura ( https://ultimaker.com/en/products/software ) and it will automatically slice and generate G-code within seconds.  Admittedly, it's G-code for running a 3D printer, rather than a milling machine, but it's a start.  The mathematics behind the two is the same, except in one case you input the diameter of the plastic filament, and the other you use the diameter of the cutting tool. 

    The reason there's a lot more 3D printing software than CNC software is probably due to the fact that there are many more programmers with time on their hands who happen to have access to a 3D printer than who happen to have access to a CNC machine. 

    Or, to put it another way, there are so many more highly amazing on-line multi-player 3D computer games in the world than there are on-line multi-player 3D CAD systems (like this one) since a higher percentage of the world's cohort of footloose (ie not happy debugging same old same old) computer programmers know how to play computer games than have ever experienced CAD.  Right now I'd put the percentages at 90% 3D games to 1% who know CAD. 






  • andrew_troupandrew_troup Member, Mentor Posts: 1,584 ✭✭✭✭✭
    I blame the educational philosophy of recent times, which has fostered a dangerous pair of misapprehensions:

    1) Education must be fun 
    (whereas it should be self evident that, provided the participants - recipients as well as providers - care enough to make it happen, pretty much any education opportunity CAN be fun --
    but to me it's not an obligation, nor is it possible, for providers 
    acting alone to make that come true.
    And the recent trend towards the 'gamification' of everything is surely just playing with a semantic accident, whereby games are automatically classified under "Fun", whereas work is automatically classified under "Other". )

    2) Things which are hard are not fun (as we all know to the contrary: provided they're worthwhile, as things get harder, mastery delivers more satisfaction)

    There's no mistaking that engineering is hard, but once that made it more, rather than less, attractive to smart kids. There seems a dwindling minority who still see life that way ...


Sign In or Register to comment.