Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: using TMC2208 #1073
    scott_12345
    Participant

    No power when stepper drivers are installed

    RickG has a fix that worked for me

    in reply to: Sandify Patterns #1021
    scott_12345
    Participant

    hi, it’s written in python, it’s not much but it works, enter the file name and the length of one arm(mm) and it should correct the gcode, if you have any issues just let me know, thanks

    import re
    
    fileName = input("enter file name: ")
    armLength = float(input("enter single arm length(mm): "))
    
    header = []
    coords = []
    
    with open(fileName + ".gcode") as file:
        for line in file:
            if "G01" in line:
                coords.append(line)
            else:
                header.append(line)
    
    def updateHeader(list):
        newCoords = []
        for i in list:
            newCoords.append(i)
            h = ''.join(newCoords)
        return h
    
    def updateCoords(list):
        newCoords = []
        for i in list:
            coord = (re.findall("[+-]?\d+\.\d+", i))
            coord[0] = float(coord[0])
            coord[0] = round(coord[0] - armLength * 2, 3)
            coord[1] = float(coord[1])
            coord[1] = round(coord[1] - armLength * 2, 3)
            x = str(coord[0])
            y = str(coord[1])
    
            line = "G01 " + "X" + x + " " + "Y" + y + "\n"
            newCoords.append(line)
            s = ''.join(newCoords)
        return s
    
    f = open("Updated " + fileName + ".Gcode", "w+")
    f.write(updateHeader(header))
    f.write(updateCoords(coords))
    
    in reply to: Sandify Patterns #1019
    scott_12345
    Participant

    hi, it seems like the website doesn’t make the centre of the circle (0,0) and tries to make an odd path there, I have made a program I’m python that does fix this and will make them useable if you would like it just let me know

Viewing 3 posts - 1 through 3 (of 3 total)