UltiMaker uses functional, analytical and tracking cookies. Tracking cookies enhance your experience on our website and may also collect your personal data outside of Ultimaker websites. If you agree with the use of tracking cookies, click “I agree, continue browsing”. You can withdraw your consent at any time. If you do not consent with the use of tracking cookies, click “Refuse”. You can find more information about cookies on our Privacy and Cookie Policy page.
Posted
· Conditional Settings in Global PLA setting
I think it's just evaluating Python, but it will only accept single lines (not blocks, which takes using a match statement off the table).
You may have to go into what programmers might all "ternary hell". Or just a big mess. Also I'm pretty sure you don't need the = sign in front of absolute values, just ones drawn programmatically. That could be confusing the Python interpreter. You also need a fallback parameter on your last ternary or it will read the "if" as a statement, not part of an operator.
Try:
speed_print = 130 if machine_nozzle_size == 0.4 else 60 if machine_nozzle_size == 0.8 else 180 if machine_nozzle_size == 0.2 else 100
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
Cura 5.7 is here and it brings a handy new workflow improvement when using Thingiverse and Cura together, as well as additional capabilities for Method series printers, and a powerful way of sharing print settings using new printer-agnostic project files! Read on to find out about all of these improvements and more.
Recommended Posts
Slashee_the_Cow 295
I think it's just evaluating Python, but it will only accept single lines (not blocks, which takes using a match statement off the table).
You may have to go into what programmers might all "ternary hell". Or just a big mess. Also I'm pretty sure you don't need the = sign in front of absolute values, just ones drawn programmatically. That could be confusing the Python interpreter. You also need a fallback parameter on your last ternary or it will read the "if" as a statement, not part of an operator.
Try:
speed_print = 130 if machine_nozzle_size == 0.4 else 60 if machine_nozzle_size == 0.8 else 180 if machine_nozzle_size == 0.2 else 100
Link to post
Share on other sites