FullControlXYZ / fullcontrol

Python version of FullControl for toolpath design (and more) - the readme below is best source of information
GNU General Public License v3.0
672 stars 78 forks source link

[FEATURE REQUEST] Add support for Vormvrij Lutum 5 #103

Open xmenage opened 3 months ago

xmenage commented 3 months ago

I have created a printer file for the Vormvrij Lutum 5. I have been able to print a few shapes with it. I made it so it replicates the same steps at the beginning and at the end that I get with the Prüsa slicer using Vormvrij configuration file. I also adjusted dia_feed to get the right amount of clay through the nozzle.

Here is the code:

Note that the reason for keeping the '; generated by PrusaSlicer 2.7.4' comment line as the first line is to allow display by the Prüsa gcode viewer so it will look at the configuration appended at the end of the file and show lines with the right width and thickness. Without this line it shows very thin lines (typical of regular plastic 3d printer). Actually to make this complete it would need to add a complete Prüsa configuration at the end, possibly loaded from a .ini used by the slicer, I have not done this yet so I copy those configuration lines from a gcode file I created previously with the Prüsa slicer. This is only needed for viewing, not for printing.

` from fullcontrol.gcode import Point, Printer, Extruder, ManualGcode, PrinterCommand, Buildplate, Hotend, Fan, StationaryExtrusion import fullcontrol.devices.community.singletool.base_settings as base_settings

def set_up(user_overrides: dict): ''' DO THIS '''

# overrides for this specific printer relative those defined in base_settings.py
printer_overrides = {
    "extrusion_width": 4.0,
    "extrusion_height": 1.3,
    "dia_feed": 4.0,  
    "print_speed": 2400,
    "travel_speed": 6000,
    "travel_format": "G1_E0",
    "e_units": "mm",
    "relative_e": False,
    'primer': 'travel',
    }
# update default initialization settings with printer-specific overrides and user-defined overrides
initialization_data = {**base_settings.default_initial_settings, **printer_overrides}
initialization_data = {**initialization_data, **user_overrides}

starting_procedure_steps = []
starting_procedure_steps.append(ManualGcode(text='; generated by PrusaSlicer 2.7.4'))
starting_procedure_steps.append(ManualGcode(
    text='; Time to print!!!!!\n; GCode created with FullControl - tell us what you\'re printing!\n; info@fullcontrol.xyz or tag FullControlXYZ on Twitter/Instagram/LinkedIn/Reddit/TikTok \n'))
starting_procedure_steps.append(ManualGcode(text='G29 S1 ; load saved height map from SD card'))
starting_procedure_steps.append(PrinterCommand(id='home'))
starting_procedure_steps.append(ManualGcode(text='M376 H20 ; taper mesh bed compensation from 0 to 20mm height.'))
starting_procedure_steps.append(PrinterCommand(id='units_mm'))
starting_procedure_steps.append(PrinterCommand(id='absolute_coords'))
starting_procedure_steps.append(Extruder(relative_gcode=initialization_data["relative_e"]))
starting_procedure_steps.append(ManualGcode(
    text='M220 S' + str(initialization_data["print_speed_percent"])+' ; set speed factor override percentage'))
starting_procedure_steps.append(ManualGcode(
    text='M221 S' + str(initialization_data["material_flow_percent"])+' ; set extrude factor override percentage'))
starting_procedure_steps.append(Extruder(on=False))
starting_procedure_steps.append(Point(x=0, y=-90, z=50))
starting_procedure_steps.append(StationaryExtrusion(volume=300, speed=120))
starting_procedure_steps.append(Printer(travel_speed=250))
starting_procedure_steps.append(Point(z=100))
starting_procedure_steps.append(Printer(travel_speed=initialization_data["travel_speed"]))
starting_procedure_steps.append(Extruder(on=True))
starting_procedure_steps.append(ManualGcode(text=';-----\n; END OF STARTING PROCEDURE\n;-----\n'))

ending_procedure_steps = []
ending_procedure_steps.append(ManualGcode(text='\n;-----\n; START OF ENDING PROCEDURE\n;-----'))
ending_procedure_steps.append(ManualGcode(text='G91 ; set relative coordination'))
ending_procedure_steps.append(ManualGcode(text='G1 Z10 F300 ;move 10mm up with 300 speed'))
ending_procedure_steps.append(ManualGcode(text='G90 ; set absolute coordination'))
ending_procedure_steps.append(ManualGcode(text='G1 X0  F2400 ; home X axis'))

initialization_data['starting_procedure_steps'] = starting_procedure_steps
initialization_data['ending_procedure_steps'] = ending_procedure_steps

return initialization_data

`