Jump to content

Python et CuraEngine


nouveau

Recommended Posts

Posted · Python et CuraEngine

Bonjour, je  tente depuis presque 2 semaine de faire communiquer python et CuraEngine sans resultat jusqu’à présent.

j'utilise code :

from os import popen

CheminSortie =r'C:\...\Sortie.gcode'
CheminFichier =r'C:\...\Box.stl'
Profile =r'D:\...\ultimaker.def.json'

sortie = popen(f"CuraEngine slice -v -p -j {Profile} -o {CheminSortie} -l {CheminFichier}'", 'r',1)
print(sortie)
print(sortie.read())

Cela   doit normalement renvoyer la sortie de la commande mais il ne revoie  rien.

J'ai aussi ajouter le chemins vert curaEngine au variable d’environnement pour être tranquille.

Après avoir tournée en rond j'ai tester ceci directement dans l'invite de commande (je suis sous window 7).

CuraEngine slice -v -p -j "D:\...\tam.def.json" -o "C:\...\Sortie.gcode" -l "C:\...\Box.stl" > Sortie.txt

le fichier Sortie.txt et aussi complètement vide pour être certain j'ai ensuite fait ceci

help > help.txt

cette fois le fichier help.txt contient bien la totalité  de l'aide comme prévu.

Si qu'elle q'un a une explication a ce phénomène ... ou une marche a suivre pour optenire ce qui et normalement retourner par la commande dans le cmd je suis preneurs.

je chercher a récupérer via python les 12 dernière ligne qui apparaisse, celle qui donne l'estimation du volume de la masse et des diférent temps de calcule.

merci pour votre aide

bonne soirée

  • Link to post
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
    • Our picks

      • UltiMaker Cura 5.8 beta released
        Another Cura release has arrived and in this 5.8 beta release, the focus is on improving Z seams, as well as completing support for the full Method series of printers by introducing a profile for the UltiMaker Method.
          • Like
        • 1 reply
      • Introducing the UltiMaker Factor 4
        We are happy to announce the next evolution in the UltiMaker 3D printer lineup: the UltiMaker Factor 4 industrial-grade 3D printer, designed to take manufacturing to new levels of efficiency and reliability. Factor 4 is an end-to-end 3D printing solution for light industrial applications
          • Thanks
          • Like
        • 3 replies
    ×
    ×
    • Create New...