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

Centreline problems

Discussion in 'SketchUcam Bugs' started by mturneruk, Nov 8, 2015.

  1. mturneruk

    mturneruk New Member

    Offline
    Messages:
    6
    Trophy Points:
    3
    Hi There...

    Amazing work on 1.4. Thanks.
    I have been using the centreline technique to do some complex pockets, as sketch-u-cam pockets do not quite work on complex shapes. PS. If you havent seen it, the plugin truoffset does a fantastic job of creating these centerlines. Much better than the sketchup offset tool.

    I found that after every pass during these centerline cuts, the z axis would needlessly retract to the safe height and then go back in again. Is this a bug ?

    You can see this in the gcode highlighted in bold below... (Safe height 3.2).
    This added ages on to my job.

    Cheers


    G00 Z3.200
    (Pass: 1)
    X86.085 Y109.364
    G00 Z0.500
    G01 Z-3.000 F2540
    Y117.885
    X82.616 Y114.623
    X82.079 Y114.338
    X86.085 Y109.364
    (Pass: 2)
    G00 Z3.200
    G00 Z0.500

    G01 Z-6.000 F2540
    Y117.885
    X82.616 Y114.623
    X82.079 Y114.338
    X86.085 Y109.364
    (Pass: 3)
    G00 Z3.200
    G00 Z0.500

    G01 Z-9.000 F2540
    Y117.885
    X82.616 Y114.623
    X82.079 Y114.338
    X86.085 Y109.364
    (Pass: 4)
    G00 Z3.200
    G00 Z0.500

    G01 Z-10.500 F2540
    Y117.885
    X82.616 Y114.623
    X82.079 Y114.338
    X86.085 Y109.364
     

    Attached Files:

    • bug.png
      bug.png
      File size:
      234.9 KB
      Views:
      57
  2. TigerPilot

    TigerPilot Well-Known Member

    Offline
    Messages:
    1,578
    Trophy Points:
    48
    Hmm...I thought we fixed the retracting between passes a long time ago. I'll let swarfer jump in here and tell why it is doing it again.
     
  3. mturneruk

    mturneruk New Member

    Offline
    Messages:
    6
    Trophy Points:
    3
    In theory am i right in saying i could manually edit the file and search and replace all of these with nothing....
     
  4. swarfer

    swarfer Moderator Staff Member

    Offline
    Messages:
    808
    Trophy Points:
    28
    Location:
    Grahamstown, South Africa
    the problem here is Sketchup's concept of 'order', when you first draw a set of lines, they are in order. if you edit one of more of them, the order changes. when you edit some other part of the drawing, the order may change again.

    you can see this clearly by using the freehand tool to draw 2 curves, start one on the left and draw clockwise to the right.
    now start a new curve on the left end of the first one, and draw anticlockwise to the right.
    set that as a centerline cut and you will see it cut one part of it as a continuous line, and the other as 'backtacks', doing each line separately.

    when generating gcode we try to determine which direction to cut, but if the direction changes halfway along the cut, what can we do?
    very difficult in code to determine what to do. for example, how do we determine the difference between a 'circle' drawn as 2 freehand curves in different directions (if we know this, we can split it two parts) and a complicated set of intersecting lines which may or may not have loops and dead ends.

    so, what to do?
    a) manually split your cut lines into segments that are all in the same order. just a tiny break in the line is enough.
    to do this you have to first generate Gcode, then look at it to see where the backtacking is taking place and create splits to separate them out.

    b) use the Bezier Curves tool to 'create polyline' before you set it as a centerline cut. this fixes the order until you edit it again.
    http://sketchucation.com/forums/viewtopic.php?t=13563

    here is an example. I drew the top line left to right, and the bottom line left to right using the freehand tool, both start at the same point.
    then set as centerline cut.
    the bottom cuts 'in order' as one cut, the top does each segment then goes back to the previous one and does it and so on, what I call 'backtacking'.

    backtack.jpg
    to fix it, just split the lines at the points where the backtacking starts and ends, in this case 2 splits are needed.
    backtack2.jpg

    I created a split on each end, about 0.5mm wide and now the cuts are good. 0.002" is enough of a split.
    I have included the sketchup file so you can see what I did.
     

    Attached Files:

  5. swarfer

    swarfer Moderator Staff Member

    Offline
    Messages:
    808
    Trophy Points:
    28
    Location:
    Grahamstown, South Africa
    now, there is another way to do the pocketing for those shapes that avoids centerline cuts entirely
    first, use the pocket tool to insert just the outlines, hold down CTRL key and click. that gives you a good continuous outline cut.
    now insert some split lines to make that complicated shape simpler so that adding zigzags works.
    if your stepover% is small ( less than 50%), remove the split lines.
    if your stepover% is large then set the split lines as 'fold cuts' of the same % depth as the pocket.

    Here is a demonstration
     
    Last edited: Nov 9, 2015
  6. TigerPilot

    TigerPilot Well-Known Member

    Offline
    Messages:
    1,578
    Trophy Points:
    48
    Yes, you can/could! I use Notepad ++ for this, but ANY editing software will do. Just erase the 'offending' lines.
     
  7. TigerPilot

    TigerPilot Well-Known Member

    Offline
    Messages:
    1,578
    Trophy Points:
    48
    swarfer, if you look at the code that he posted you'll see that it is not 'stitching', it is retracting between passes. It is always at the same x or y coordinates.
     
  8. swarfer

    swarfer Moderator Staff Member

    Offline
    Messages:
    808
    Trophy Points:
    28
    Location:
    Grahamstown, South Africa
    ah Yoram, you are right! knew I should have run the code through a simulator!

    The retract prevent code only works for inside and outside cuts which are known to be loops.

    In the case of centerline cuts, the beginning and end of the cut sequence can be anywhere, we don't know where, so we have to retract to avoid cutting into material that is not supposed to be cut.
    In this case the cut is a loop but in the case of the zigzag in a pocket, it is not, and the code does not know that so has to retract.
    Many centerline cuts are sequences of intersecting cuts where there are many 'end points' and no loop at all.

    I don't see a way to improve it except to rapid down to 'previous pass depth' in a similar way to what happens after a tab. However, doing this is very complicated and prone to errors.
     
  9. swarfer

    swarfer Moderator Staff Member

    Offline
    Messages:
    808
    Trophy Points:
    28
    Location:
    Grahamstown, South Africa
    well, after a few hours of experimenting I think I found a solution, or part of the solution at least.
    @mturneruk , install the attached, restart sketchup, then regenrate that gcode and see if it works.....
     

    Attached Files:

Share This Page