Jump to content

Cuq

Expert
  • Posts

    676
  • Joined

  • Last visited

  • Days Won

    18

Everything posted by Cuq

  1. vu sur github plugin pour export HTML des réglages via la fonction Enregistrer... de Cura https://github.com/johnnygizmo/CuraSettingsWriter
  2. You can also use this Plug-IN to add the possibility to save your settings under the HTML format via the function SAVE of Cura : https://github.com/johnnygizmo/CuraSettingsWriter
  3. Hello I'm certainly missing something but I d'ont know what ? I'm trying to use the same code to create a SnapShot .. I can get a file but the result is absolutly not correct. If Im using the plugin UPFWriter I got the result thumbnail.png ( the first image) and my result is my_thumbnail.png (the second image) ? Actual source code # Copyright (c) 2020 # The SimpleShapes plugin is released under the terms of the AGPLv3 or higher. from PyQt5.QtCore import QObject from PyQt5.QtCore import QBuffer from UM.Extension import Extension from cura.CuraApplication import CuraApplication from cura.Snapshot import Snapshot from cura.Utils.Threading import call_on_qt_thread from UM.Application import Application from UM.Logger import Logger from UM.Message import Message from UM.MimeTypeDatabase import MimeTypeDatabase, MimeType from UM.i18n import i18nCatalog catalog = i18nCatalog("cura") class CreateSnapShot(Extension, QObject,): def __init__(self, parent = None) -> None: QObject.__init__(self, parent) Extension.__init__(self) # attention pas le même nom que le menu self.addMenuItem(catalog.i18nc("@item:inmenu", "Snap"), self.doExtendedCreateTrainingPics) self._snapshot = None def doExtendedCreateTrainingPics(self): self.doCreateTrainingdata(True) #def doExtendedWrite(self): # self.write(stream) @call_on_qt_thread def doCreateTrainingdata(self, extended_mode): self._write() self._message = Message(catalog.i18nc("@info:status", "Creating .PNG pics"), title = catalog.i18nc("@title", "PNG Pics")) self._message.show() def _createSnapshot(self, *args): # must be called from the main thread because of OpenGL Logger.log("d", "Creating thumbnail image...") try: self._snapshot = Snapshot.snapshot(width = 300, height = 300) except Exception: Logger.logException("w", "Failed to create snapshot image") self._snapshot = None @call_on_qt_thread def _write(self): self._createSnapshot() #Store the thumbnail. if self._snapshot: thumbnail_image = self._snapshot thumbnail_image.save("C:/temp/thumbnail.png", "PNG") Logger.log("d", "Thumbnail creation") else: Logger.log("d", "Thumbnail not created, cannot save it")
  4. As workaround I'm using the jobname J_Name = CuraApplication.getInstance().getPrintInformation().jobName But it doesn't give me the path to the 3MF archive file.
  5. Hello, I'm working on a new plugin. In this plugin I need to get the path to the current 3mf file loaded in Cura. Could someone give me a lead on how to retrieve that information using a python code. Thanks in advance
  6. finally the right code global_container_stack = CuraApplication.getInstance().getGlobalContainerStack() extruder = global_container_stack.extruderList[int(id_ex)] # Define support_xy_distance extruder.setProperty("support_xy_distance", "value", self._UseOffset)
  7. This is not a Cura issue but a well known situation in FDM technology, have a look to this page for more solution. https://hackaday.com/2020/05/17/look-ma-no-support-for-my-floating-holes/
  8. Install the Plugin : Printer settings Then in the section Printer settings uncheck the parameter : Wait for Build Plate Heatup
  9. Hello, I'm Still figting with Python , this time I'm looking for a solution to modify a parameter in a profil. The following Code doesn't return any error . But it doesn't change anything. id_ex=0 global_container_stack = Application.getInstance().getGlobalContainerStack() extruder = global_container_stack.extruderList[int(id_ex)] # Define support_xy_distance definition = extruder.getSettingDefinition("support_xy_distance") new_instance = SettingInstance(definition, extruder) new_instance.setProperty("value", self._UseOffset) Any Help would be welcome
  10. Hello, When Y use a Mesh as support , Cura Use the value set in the Profil as Support X/Y distance and not the value define for the element support. Is there any solution to use the value set on the element ? and keep the global X/Y distance for the other support ?
  11. Hello, I'm still working on a new plugin and I'm wondering if there is any difference in the python langage between : from cura.CuraApplication import CuraApplication and from UM.Application import Application
  12. Finaly I don't need to go throug the market place. I made the file "manualy" it's working for a basic install on my Cura release 🙂 CustomSupportsCylinder1.0.0-sdk7.0.0.curapackage.zip
  13. Ok I wasn't aware about, that. Thanks to your help the plugin is now "acceptable". So next step for me: find the solution to create a curapackage. Can you point me to a tuto or document which explain how to do that ? [Edit] your solution in test https://community.ultimaker.com/topic/26046-writing-a-custom-cura-package/?do=findComment&comment=229467 and : https://github.com/Ultimaker/Cura/wiki/Creating-Packages But my goal at the end is not necessary to put it on market place. Is it possible just to get the curapackage via this solution ?
  14. Alors le dernier recours c'est les support personnalisées et bien régler ses Plafonds de supports peut être sur un modèle mon compliqué ou une partie de celui là
  15. Ok I think I have simplify the source code and based on your recommendation switched to the solution of storing the support size value in Preference "customsupportcylinder/s_size" CustomSupportCylinder on Github
  16. Ok I will try to modify my present code according to your recommendation. Thanks a lot for your time and the support you give us
  17. thanks a lot ... It's working, but as I m a newbie in Python it's absolutly not a clean code.. So yes if you can have a look and clean it a little bit or give me some advice it would be very nice : The plugin source code on Github
  18. Ok it's a little bit more clear now, I can define this windows .. But I still have some problems to understand how the Binding mecanism works between the windows and the main code. Can you help me on this point ? I have now a control TextField and I can fix the value with the code : def getDiam(self) -> float: """ return: Diam in mm. """ # get diameter_custom_support as cylinder value id_ex=0 extrud = Application.getInstance().getGlobalContainerStack().extruderList DiamCylinder = extrud[id_ex].getProperty("diameter_custom_support", "value") return DiamCylinder but how to get back this value form the TextField ?
  19. That's exactly what I want , using a setting is not the right solution but as I don't know how to implement such type of numeric field in the tool panel it was for me a workaround. In the different plugins there is no sample code to integrate this type of function. I'm just a beginner in Python coding and this type of code is too hight level for me without an existing example.
  20. Step by Step thanks to the plugin ZOffset I found a solution to define a new parameter. Still looking to define this value via a dedicated windows
  21. So my question is now where can I find a "basic sample code" or how to implement in this plugin a windows to define specific parameters to define the size of this cylinder ? Hereafter a sample view of the expected function to clarify my request.
  22. temporary solution : using the value of support_tower_diameter (Support as Tower diameter) as Cylinder diameter: # get support_tower_diameter as cylinder value id_ex=0 extrud = Application.getInstance().getGlobalContainerStack().extruderList DiamCylinder = extrud[id_ex].getProperty("support_tower_diameter", "value")
  23. Hello, I'm working on a plugin based on the CustomSupport plugin. But in this case I'm not creating a cube but a cylinder. I haven't any problem to get the right length ( from the picked point to the base) but I wanted to define the radius as a parameter in order to be able to customize this value. Is it possible to add a customized value ? or to get an existing value for this parameter Ie : support_conical_min_width ? Cylinder.zip
  24. Bon c'est pas le sujet mais Support arborescent pour ce genre de pièce et de cas de figure, normalement c'est quand même le top . Et en plus c'est quand même là où Cura fait la différence avec d'autres Slicers
  25. Oui par contre un truc marrant .. en regardant mon image je viens de voir que Cura Indique premier layer = 425 alors que c'est bien le premier .. pour lui il a bien slicé 425 layer vide en partant du plateau sauf qu'il les a supprimés. Du coup c'est plutôt pas mal ca permet de voir si t'es raccord entre le Print de tes pièces précédentes et celles que tu vas relancer. C'est plutôt un bon point même si finalement ça serait mieux que Cura puisse nous permettre de slicer avec des hauteurs différentes en utilisant la fonction de modélisation des paramètres de chevauchement.
×
×
  • Create New...