Welcome to Our Community

Some features disabled for guests. Register Today.

Vpype and vpype-gcode to generate gcode, TOML file

Discussion in 'Other Software' started by lizard, Nov 8, 2022.

  1. lizard

    lizard New
    Builder

    Joined:
    Oct 23, 2022
    Messages:
    24
    Likes Received:
    4
    I just built a huge pen plotter using the Acro system. I really have zero idea what I am doing (on both the software and hardware side), and I feel quite proud I was able to put the thing together. It is working, and now I am trying to figure out my software workflow. The CAM Openbuilds software gets angry when i put in even small SVGs with lots of lines and since this is essentially what I need to print, I have had to find a different option to produce gcode.

    I am now using Vpype and a plugin called vpype-gcode to process the SVGs and then to generate the gcode. There is a configuration file (vpype.toml) that basically sets the template of the gcode and while I seem to be able to get it quite close, for some reason it isn't completely correct (although I will keep trying).

    My question is if anyone here is also using vpype-gcode and can share their TOML file with me so I can look at other examples or steal your knowledge :)? They have some examples here: bundled toml.

    Additionally, if people are looking for other software tools, Vpype seems quite cool. It is extremely fast and vpype offers lots of ways to optimize and process SVGs for plotting. Producing the gcode is super fast on my mahcine.
     
  2. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    13,751
    Likes Received:
    4,070
    vpype-gcode/bundled_configs.toml at main · plottertools/vpype-gcode looks like it'll do the job - do a trial run and see if Grbl complains about anything.
    If it does, include the resultant gcode file as well

    Make sure to use closed paths instead of segments, optimise segment length (no point going to fine resolution) and you can also speed up OpenBuildsCAM by turning off the eye candy under Settings > Settings > Performance: Disable Tool-Width Preview (down at the bottom, scroll down).

    It still expects closed vectors though. See docs:software:file-errors [OpenBuilds Documentation]
     
  3. lizard

    lizard New
    Builder

    Joined:
    Oct 23, 2022
    Messages:
    24
    Likes Received:
    4
    The gcodemm referenced above didn't fully work because I needed the pen on/off, and it wasn't included in that profile. I ended up reverse engineering a TOML file from what the CAM software would create and send to the Openbuilds Control. This is my profile that worked perfectly (actually except the end that I can change because the pen was in the down position at 0,0 and should be up):

    unit = "mm"
    document_start = """G21
    G54
    G21
    G90
    """
    layer_start = "(Start Layer)\n"
    line_start = "(Start Block)\n"
    segment_first = """G0 Z0
    G0 X{x:.4f} Y{y:.4f}
    M3S0
    G4 P0.5; Tool On\n"""
    segment = "G1 F2000 X{x:.4f} Y{y:.4f} Z-0.1000\n"
    line_end = """M3S150
    G4 P0.5\n"""
    document_end = """M5
    G00 X0.0000 Y0.0000
    M2"""
    invert_y = true

    And good to know about the closed paths. This must be why it was having so many problems—I almost have no closed paths. Although CAM did fine and was super quick with a complicated file full of line segments that I used for the test.

    Attaching the two screenshots comparing CAM processed gcode versus the vpype-gcode just because I found it interesting.
     

    Attached Files:

  4. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    13,751
    Likes Received:
    4,070
    Rather than a select-all approach, you can control the order of operations easily by creating seperate toolpaths per entity :)
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice