1. Hey guyz. Welcome to the All New Phlatforum!



    Sign Up and take a look around. There are so many awesome new features.

    The Phlatforum is a place we can all hang out and

    have fun sharing our RC adventures!

  2. Dismiss Notice

Generating Gcode for 3D Object

Discussion in 'SketchUcam Help' started by Dave9788, May 5, 2014.

  1. Dave9788

    Dave9788 New Member

    Offline
    Messages:
    3
    Trophy Points:
    1
    Created a drawing in Sketchup, moved it to the safe area in SketchUcam and when I generate 3D code all I get are the parameters from the setup screen. Is it necessary to flatten all the edges prior to generating gcode? If you flatten all the edges then how does it now how deep the cuts are supposed to be? I used the same drawing and flattened the edges, generated the gcode but when I ran the gcode through Mach3 it appears the cuts are too deep. I watched the two videos but they were a simpler object than what I am working with. Thank you for your help!
     
  2. swarfer

    swarfer Moderator Staff Member

    Offline
    Messages:
    808
    Trophy Points:
    28
    Location:
    Grahamstown, South Africa
    if you are doing 3D code then you NEVER flatten any edges. and you don't add any cutlines either.
    3D code is generated 'over' an object. the base of the object must be on the XY plane.
    it can help to put a flat ledge around the object that is the size of your material.

    lets say you have a 50mm thick piece of foam.
    you have drawn an object that is 40mm at its thickest.
    set material thickness to 50mm before generating Gcode
    set the tool tip on the top of the foam block, that is Z = 0.

    note that the 3D generator does not allow for the diameter of the tool, it simply steps the center of the end of the tool along the surface of what you drew.

    small step overs will create very smooth finishes, but will take HOURS to run.

    maybe you can post your drawing so we can help you more.
     
  3. Dave9788

    Dave9788 New Member

    Offline
    Messages:
    3
    Trophy Points:
    1
    Thanks for your quick reply. Redid the drawing, moved into the Sketchucam safe area but it still does not create the gcode. I made the drawing a component to move it into Sketchucam, do I have undo the component? Here is the drawing (I hope!). Thanks for your help
     

    Attached Files:

  4. Dave9788

    Dave9788 New Member

    Offline
    Messages:
    3
    Trophy Points:
    1
    Thanks for the information! If I understand your comments correctly, when I create the drawing I have to allow an extra distance, equal to 1/2 of the width of the tool being used, to end up with a finished product the size I desire. If I want an object 30mm wide and am using a 4mm diameter bit then I would the object 34mm (2mm additional on each side) so that the finished object would be 30mm. I can do that but it will certainly add complexity to making the original drawing. I did post the drawing online but will reattach it here.
    Thanks for your help!!
     

    Attached Files:

  5. swarfer

    swarfer Moderator Staff Member

    Offline
    Messages:
    808
    Trophy Points:
    28
    Location:
    Grahamstown, South Africa
    you have the idea correct.
    however, looking at your part I suggest doing it as a set of pocket cuts instead, as though it were flat material as thick as your deepest cut. I'll post a drawing just now showing what I mean.
     
  6. swarfer

    swarfer Moderator Staff Member

    Offline
    Messages:
    808
    Trophy Points:
    28
    Location:
    Grahamstown, South Africa
    Thanks for your help!![/QUOTE]

    Here is my way of doing this, much more accurate than the 3D generator!
    first a rendering from OpenSCAM on the results of the couplerjig.nc file
    couplerjig.jpg

    x,y zero is 0.5inch left and down from the bottom left corner of the material. you cannot zero on the
    corner of the material itself because the cuts go outside that border.
    Z zero is the top surface of the material.
    you will see in the sketchup file that I have done 4 flat drawings.
    from left to right
    1 - does the deep slot at the top
    2 - does the side cutouts
    3 - does the outlines of the round stubs
    4 - does the rest of the top surface.

    I have optimized the code a bit, but you can regenerate the output quite easily.
    do this - for each drawing in turn, left to right
    position the safe area on the top right corner of the little triangle
    output Gcode, i used filenames cj1.nc through cj4.nc
    I then combined the 4 files into one file in a text editor, removing the unneeded headers and footers between each set of code.
    You should preview the results in a good previewer, I am using OpenScam 0.2.5
     

    Attached Files:

    kram242 likes this.
  7. Ringo Davis

    Ringo Davis Member

    Offline
    Messages:
    60
    Trophy Points:
    8
    Can someone tell me how to generate 3d code for the object attached? I've tried using the generate 3d but I get a big cube at the end, no detail. I have also tried flattening it out and doing pockets of different depth but cant get pockets to work on some parts.
    Any thoughts?
    Thanks
     

    Attached Files:

  8. swarfer

    swarfer Moderator Staff Member

    Offline
    Messages:
    808
    Trophy Points:
    28
    Location:
    Grahamstown, South Africa
    will look at it at work tomorrow, no Sketchup14 here....
     
  9. Ringo Davis

    Ringo Davis Member

    Offline
    Messages:
    60
    Trophy Points:
    8
    Thanks, I saved it as version 7 too in case that helps.
     

    Attached Files:

  10. swarfer

    swarfer Moderator Staff Member

    Offline
    Messages:
    808
    Trophy Points:
    28
    Location:
    Grahamstown, South Africa
    Attached find my redone drawing (saved with V8).
    I considered the part as a set of layers. for each layer I set the material thickness to the depth I need, then do a 100% depth pocket cut
    on that area.
    I have split the part into 4 sub-drawings, each one to has its Gcode generated separately in order from left to right.
    They all use the same reference point, 1/4" from left bottom of part.
    You need to move the safe area to each drawing in turn to generate the Gcode.
    Safe area is 3.5x2".

    All cuts assume you are starting with material 25/64" thick.
    Max depth is 100%

    output 1 cuts down the first level (multipass)
    output 2 cuts down another 1/32 in some areas, need not be multipass since there is only 1/32 to cut anyway
    • but do check the depth of cut on the right side if you have material extending more than 1/16" beyond the end of the part.
    • note how I have extended the border line to the right in order to cut all the way to the edge
    output 3 cuts the center triangle and the holes. check sizes of the holes! I measured them at 10/64"
    • may be better to drill the holes with a separate (real) drill bit, after cut 4. you'd need to copy and paste a new drawing (5), remove the holes from drawing 3, and add them to drawing 5.
    output 4 cuts around the outside of the part.

    You should test this code in a good simulator or on a chunk of foam before committing metal.
    I used OpenSCAM to preview the code, though it only deals with metric Gcode so I had to convert the drawing to metric and output the gcode in that mode. since the Linux version messes up arcs I will not post the result (-:
     

    Attached Files:

  11. swarfer

    swarfer Moderator Staff Member

    Offline
    Messages:
    808
    Trophy Points:
    28
    Location:
    Grahamstown, South Africa
    overview.png this is what the finished part looks like. attached images show end of cut1, end of cut2 and end of cut3.
    scrap what i said above about cut2 not needing to be multipass, it must be since there is material left over from cut1 that it will cut.
     

    Attached Files:

  12. Ringo Davis

    Ringo Davis Member

    Offline
    Messages:
    60
    Trophy Points:
    8
    Very cool thanks. I'll cut one this weekend out of HDPE and try it out
     

Share This Page