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

G02 an G03 circle

Discussion in 'SketchUcam DOWNLOAD' started by Claus Pfisterer, Feb 1, 2015.

  1. Claus Pfisterer

    Claus Pfisterer New Member

    Offline
    Messages:
    5
    Trophy Points:
    1
    Hey everybody
    Since Octobre 2014 i'm practicing in SketchUcam. I think in the 1.1e-beta version there was a better way for cutting circles. When i'm researching in the web i read there has only to be known the radius an the center point

    Nowadys i have think i have installed the latest version of SketchUcam. But if i read the gCode for a simple circle, there will never be again code such as it earlier generated.

    The problem with this is, it allthetime cuts out linear segments, not arcs. So circle never will be really round.
    What could i do?

    Kind regards
    Claus
     

    Attached Files:

  2. BobAd

    BobAd New Member

    Offline
    Messages:
    6
    Trophy Points:
    1
    Location:
    Vero Beach, Florida
    Claus: click the circle, in the measurement window type a larger number, I use 64 or 128, click enter then draw your circle: try it, it works.
    SketchUcam will only follow the the line segments less lines less of a circle.
     
  3. TigerPilot

    TigerPilot Well-Known Member

    Offline
    Messages:
    1,578
    Trophy Points:
    48
    Claus, SketchUp makes circles in segments. If you zoom into the part you'll see that the circle is made of many strait lines. If you don't explode the circle SkechUcam knows it's a circle and will those strait lines as arcs. You can see this in your second picture. It says that the radius is 8.9953 mm. All those arcs will form a circle. I don't know what is going on in your first picture. I never have the I or the J prefix. I always have it as you see in the second picture.
     
  4. swarfer

    swarfer Moderator Staff Member

    Offline
    Messages:
    808
    Trophy Points:
    28
    Location:
    Grahamstown, South Africa
    in that BETA version (that means a test version, right?!) the IJ arc formats were experimental. it was discovered that they work fine for complete circles, but make a complete mess when the circle gets edited because the partial segments at the ends have incorrect co-ordinates.

    so in the 1.1e RELEASE version, I went back to the R format arc segments.
    The current version 1.2a retains the R format arcs, because they always work. This is not going to change, because the way Sketchup stores the arcs after editing breaks the IJ format.

    Internally, Sketchup stores a circle as a bunch of straight segments with the added attributes of 'this is an arc' and 'radius'.
    If you do not edit the circle or partial circle, these attributes stay set, and when Sketchucam generates the Gcode it outputs G02 and G03 arc segments.
    However, some editing operations, and always the 'explode' operation, removes the 'this is an arc' attribute and SketchUcam has to consider it a line segment and cut each segment as a straight line.

    As BobAd said, if you use more segments in an arc than the default 24 you can barely see the straight line segments. Try 48 or 96 and see for yourself (do not go much higher, it does not add precision and takes much longer to draw and cut) . You can set the default in the preferences so every new arc will have the desired number of segments.

    BTW 1.2b will fix the problem that polygons get cut as circles unless they are exploded.
     
  5. Claus Pfisterer

    Claus Pfisterer New Member

    Offline
    Messages:
    5
    Trophy Points:
    1
    Do you really get another gCode with more segments? I tried up to 500 sites per circle, nothing changed in the gCode. Lots sure, with so many segments the circle would be almost round when routing, but i'm looking for a clean gCode.
    Can you post a picture of your successful circle?
     
  6. swarfer

    swarfer Moderator Staff Member

    Offline
    Messages:
    808
    Trophy Points:
    28
    Location:
    Grahamstown, South Africa
    Claus, please watch this video

    in the video I draw 2 circles, explode the second one, add inside cut lines and generate Gcode.
    in the Gcode viewer you can see that the first circle (on the left) is made of arc segments, while the circle I exploded is cut as line segments.
    They are both drawn and cut at the default 24 segments per circle. For small circles this is hardly noticeable, but as the circle gets bigger the flat edges get bigger too.

    Then I start a new circle and set the segments to 96 before drawing it, watch the edit box at bottom right carefully. you have to set the number of segments before drawing the circle, that is, type the number and press enter. I use multiples of 24 because that ensures that there is always a vertex at 0, 90, 180 and 270 degrees around the circle, makes adding intersecting lines easier.

    Please note that 1.1e-beta generated arc segments or line segments for exactly the same situations, that has not changed at all. if a line is an arc segment in Sketchup, the Gcode will have a G02 or G03 move and changing back from IJ format to R format has not changed that in any way.
     
  7. 3DMON

    3DMON Moderator Staff Member

    Offline
    Messages:
    2,380
    Trophy Points:
    38
    Location:
    Sebastian, Florida
    Where at swarfer? I've looked everywhere to be able to save my default arc and circle segments and don't see any options for this.
    My preference that works great for me is 50 on the circle and 25 on arcs.
     
  8. swarfer

    swarfer Moderator Staff Member

    Offline
    Messages:
    808
    Trophy Points:
    28
    Location:
    Grahamstown, South Africa
    well now, my memory tells me I set it somewhere, thought it was in preferences, but now I cannot find it anywhere, and cannot find a web reference to it anywhere either. sorry. <-:

    however, look up the help on arc segments, some interesting stuff on setting it as '10s' or '10c', for example...

    btw setting as 24 or a multiple of that ensures that there is always an intersection at the 90 degrees points around the circle. 25 will mean there is a flat edge 90 degrees from the start point, which may introduce very small errors in lines drawn from that point.
     
    Last edited: Feb 3, 2015
  9. 3DMON

    3DMON Moderator Staff Member

    Offline
    Messages:
    2,380
    Trophy Points:
    38
    Location:
    Sebastian, Florida
    You know I always see that and it never really bothered me but knowing all I had to do was put 48 instead, tells me I will be doing that now.
    Thanks.
     
  10. swarfer

    swarfer Moderator Staff Member

    Offline
    Messages:
    808
    Trophy Points:
    28
    Location:
    Grahamstown, South Africa
    if you change the number of segments in a circle you will need to delete and recreate the inside/outside cut lines.
     
  11. GorillaBob

    GorillaBob New Member

    Offline
    Messages:
    21
    Trophy Points:
    1
    Location:
    Arizona
  12. Claus Pfisterer

    Claus Pfisterer New Member

    Offline
    Messages:
    5
    Trophy Points:
    1
    Hey everybody
    Thanks everybody for their replies. I figured out, that the not so round circle behavior came from something else. Sorry for guiding to the wrong direction. But i think, it could be interesting for someone else too.
    What the matter was: On each end of a segment (of a circle or an arc) the machine stopped a short moment until the movement to the next radi was to be continued. So this behavior produced really unsmooth circles.

    In the file MyConstants.rb on line 75 i deactivated the G61-command. Then I manually wrote G64 instead of the missing G61. Meanwhile i couldn't imagine what this command was for.

    But when drove some circles it was finally as smooth as I ever dreamt for!
    If your machine should be configured to use G61, i guess you could change the code in
    PhlatMill.rb on line 145 as follows:
    original:
    stop_code = $phoptions.use_exact_path? ? "G61" : "" # G61 - Exact Path Mode
    modified:
    stop_code = $phoptions.use_exact_path? ? "G61" : "64" # G61 - Exact Path Mode

    That's what i did. I know, modify code from someone else is not a very good idea, since their code will still change and you could get lost, when some behavior in a recent change will be missing.
    But anyway, i found it a mark worth.
     
  13. swarfer

    swarfer Moderator Staff Member

    Offline
    Messages:
    808
    Trophy Points:
    28
    Location:
    Grahamstown, South Africa
    i think you are looking at backlash in the machine. do you see similar marks at the start and stop points on straight lines?

    G61 and G64 are complimentary and are not supported by all controllers, while on controllers that do support them, they may also support additional options (the P tolerance factor).

    G61 is absolute stop mode, this causes a stop at all programmed end points

    G64 is smooth motion mode, where the controller will try to maintain feed speed through programmed end points.
    This means it won't stop, but it may cut the corner and be less accurate. good controllers like LinuxCNC support an additional parameter like this
    G64 P0.5 (assuming metric mode)
    where the P0.5 tells it to stay within 0.5mm of the programmed path.
    by increasing the P value you can get some serious speed through corners at the cost of accuracy, so much cost that a programmed triangle will cut as a wobbly circle.

    These codes are also modal. After setting it, the controller will remember it until the next power cycle.
    This means you can turn stop mode off in SketchUcam using the Tools|Phlatboyz|Options|Features menu (we don't use MyConstants.rb any more, the Options menu has replaced it), and then add G64 to your startup block for the controller. Now every time your controller boots it will be in G64 mode, if that is what you want. Don't forget to set the tolerance P value so that you know what you are getting in terms of accuracy.
     
  14. Claus Pfisterer

    Claus Pfisterer New Member

    Offline
    Messages:
    5
    Trophy Points:
    1
    Hi swarfer

    Great! Thank you a lot. The options from the menu with the machine-features instead of MyConstants.rb are great. I didn't know. I'm working on several woodrouters. Two of them are driven with the software Mach3 on windows-systems. The third one is driven by a Syntech controller.

    One of the Mach3-driven machines I have access to experiment. I did install on a PC LinuxCNC and tried to get work with it. But honestly, i didn't invest to much time to get the controller working. When i read on the forums, it seemed to complex for me to get success.
    First it was a discussion about USB-Controller they don't work accurate with LinuxCNC.
    So the machine i have access to is a DoughtyDrive (http://www.doughtydrive.com) and the controller is a GeckoUSBDriver (http://www.geckodrive.com).

    Do you think it will work with LinuxCNC
    I really would love it to work with Linux, since we are founding our FabLab and would like to work with Linux:
    http://makerspace-rheinfelden.ch/

    Kind regards
    Claus
     
  15. swarfer

    swarfer Moderator Staff Member

    Offline
    Messages:
    808
    Trophy Points:
    28
    Location:
    Grahamstown, South Africa
    I added the options menu a couple of versions back, pretty sure I made much of it in the release notes (-:
    it is also mentioned in the SketchUcam help, hit the big blue question mark in the toolbar

    LinuxCNC is designed around the parallel port or the very expensive embedded servo drivers. While there are some USB drivers that are
    supposed to work with it, the software end is still very new as far as I can tell, and of course there is very little manufacturer buy-in.
    My problem with the USB stuff is that a lot of work went into making LinuxCNC's path planner and stepping engine very very good, why then go around it and give the task to a 'not as good' USB controller? <-:
    (not to imply that all the USB controllers are bad, they are just not as mature and of course do not use processors that are anywhere near as powerful as the one in a PC. That said, I am impressed by some of them, like the TinyG with its constant jerk acceleration, and I have been messing with an Arduino with GRBL and while I favour LinuxCNC, I will use GRBL for something for sure, it is pretty good.)

    End result is that if you have a PC with a parallel port and a stepper hardware driver that takes step and direction signals (like a Gecko 540 and most of the other Gecko drives) then LinuxCNC will work perfectly. I have never found setup to be difficult, but then, I did read the manual. (-:

    lovely machine! I cannot find any USB drivers on the Gecko site, they all appear to be either step and direction or RS485. what did I miss?
     

Share This Page