3D Workspace
Home
Assets
Affiliate Program
Sign up/Log in
?
Upgrade
DCC Bridge
3D Creation Made Simple
Text & Image to 3D Model in seconds
One-Click Texturing & Smart Detail Editing
Free Credits Monthly
Start Free
Anonymous1757817075
12-10 21:35
Model Name
3d printer model
Tags
machine
rendering
sci-fi
Prompt
import subprocess from pathlib import Path # ----------------------------- # Parâmetros # ----------------------------- stl_file = "modelo_bullet_hemisferio.stl" gcode_file = "bullet_cura.gcode" printer_profile = { "printer_name": "Ender 3 S1", "layer_height": 0.2, "infill": 20, "print_speed": 50, "nozzle_diameter": 0.4, "extruder_temp": 200, "bed_temp": 60, "adhesion": "Brim", "material": "PLA" } # ----------------------------- # O método abaixo usa o CuraEngine (motor de fatiamento do Cura) # Para isso você precisa instalar o CuraEngine: # https://github.com/Ultimaker/CuraEngine cura_engine_path = "/path/to/CuraEngine" # caminho do executável CuraEngine # Verifica se o STL existe if not Path(stl_file).exists(): raise FileNotFoundError(f"{stl_file} não encontrado!") # Comando para fatiar STL usando CuraEngine command = [ cura_engine_path, "slice", "-v", "-j", "definitions/ender3s1.def.json", # perfil da impressora (substitua se necessário) "-l", stl_file, "-o", gcode_file, "-s", f"layer_height={printer_profile['layer_height']}", "-s", f"infill_sparse_density={printer_profile['infill']}", "-s", f"print_speed={printer_profile['print_speed']}", "-s", f"nozzle_diameter={printer_profile['nozzle_diameter']}", "-s", f"material_print_temperature={printer_profile['extruder_temp']}", "-s", f"material_bed_temperature={printer_profile['bed_temp']}", "-s", f"adhesion_type={printer_profile['adhesion']}" ] # Executa o fatiamento subprocess.run(command) print(f"G-code pronto gerado: {gcode_file}")
Detailed Info
Related Models
Enter invite code
Enter invite code to get credits!
Expires in: 00:00:00