1. Got a question or need help troubleshooting? Post to the troubleshooting forum or Search the forums!

GetToDahChoppa CLI tool

Discussion in 'Software' started by OutsourcedGuru, Oct 29, 2017.

  1. OutsourcedGuru

    OutsourcedGuru Active Member

    Joined:
    Jun 3, 2017
    Messages:
    752
    Likes Received:
    137
    I've written a CLI for chopping an indicated GCODE file into sub-files, suitable for printing different colors by layer. It assumes Cura as the slicer at the moment. It's written in the Go language, for what it's worth.

    Repository

    Get-to-the-choppa.jpg

    Code:
    $ GetToDahChoppah -beginning -to 17 -ordinal 1 -count 2 -msg="Black" /Users/user/Desktop/filename.gcode
    Original: /Users/user/Desktop/filename.gcode
    Slicer: Cura_SteamEngine 2.3.1
    Layers: 24
    Slicing:
    Output filename: /Users/user/Desktop/filename_1of2.gcode
    From: 0
    To: 17
    Msg: "Black"
    
    $ GetToDahChoppah -from 18 -end -ordinal 2 -count 2 -msg="White" /Users/user/Desktop/filename.gcode
    Original: /Users/user/Desktop/filename.gcode
    Slicer: Cura_SteamEngine 2.3.1
    Layers: 24
    Slicing:
    Output filename: /Users/user/Desktop/filename_2of2.gcode
    From: 18
    To: 24
    Msg: "White"
    
    Start the first job to print to completion, run a filament change wizard, verify that G29 autoleveling is toggled off and send the second job to print.

    This will allow you to print different filament types per sub-file since you can edit the header for the temperature more easily like this.

    DSC_0199.png
     

Share This Page