Jump to content

Marco_Bre

New member
  • Posts

    1
  • Joined

  • Last visited

Personal Information

  • 3D printer
    I have no 3D printer

Marco_Bre's Achievements

0

Reputation

  1. Hello, I am developing a post processing script that write the modified (and only those modified) print settings in the GCODE, like that: # per object settings: True ; object_1 -> extruder_1 ; object_2 -> extruder_1 ; object_3 -> extruder_2 ; ; Walls ; Wall Thickness = 0.7 ; Wall Line Count = 4 (object_1) ; Wall Line Count = 3 (extruder_1) # not defined in object_2 ; Wall Line Count = 3 (object_3) ; Wall Transition Length = 0.35 (extruder_1) # do not duplicate this line for obj_1 & obj_2 ; Wall Transition Length = 0.35 (object_3) ; Outer Wall Wipe Distance = 0.8 ; Outer Wall Inset = 0.04 ; Optimize Wall Printing Order = True ; Minimum Wall Line Width = 0.34 # per object settings: False ; Walls ; Wall Thickness = 0.7 ; Wall Line Count = 3 (extruder_1) ; Wall Transition Length = 0.35 (extruder_1) ; Wall Transition Length = 0.35 (extruder_2) ; Outer Wall Wipe Distance = 0.8 ; Outer Wall Inset = 0.04 ; Optimize Wall Printing Order = True ; Minimum Wall Line Width = 0.34 # show global and extruder override location: True ; Walls ; Wall Thickness = 0.7 (global: quality_changes) ; Wall Line Count = 3 (extruder_1: User) ; Wall Transition Length = 0.35 (extruder_1: definition) ; Wall Transition Length = 0.35 (extruder_2: material) ; Outer Wall Wipe Distance = 0.8 (global: User) ; Outer Wall Inset = 0.04 (global: User) ; Optimize Wall Printing Order = True (global: User) ; Minimum Wall Line Width = 0.34 (global: User) However, I am currently very little aware of the capabilities of the cura API, and my script only gets the parameters from the extruder(s). When browsing the cura wiki (https://github.com/Ultimaker/Cura/wiki/Container-Stacks), I came across this picture: My new goal is to query all the object containers, and for each object, and each parameters, go down the stack to find the actual parameter value (the object parameter may not override every settings, and in fact, rarely do so). My first question is: How to query all the ContainerStack instances to access the per-Object settings? I did not find anything similar to `Application.getInstance().getGlobalContainerStack().extruderList` for objects. The way I intend to write my script: Because I want to know where a setting comes from, I can't let cura go down a stack, I have to do it myself. - I will get the global definition to go through each and every settings in order - for each setting - for each stack (from per-object, to global) - for each container (from Settings/User to definition) - I will check if a property exists. - if yes, I write it in the GCode with where it came from (I will have to be careful to not duplicate anything from extruder as multiple objects can inherit the same extruderstack) - if no, I will try the next container if it exists, or the next stack Do you have any remarks on how I could approach this problem better ? Thank you in advance.
×
×
  • Create New...