RecommendedStrengthSelector.qml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. // Copyright (c) 2022 Ultimaker B.V.
  2. // Cura is released under the terms of the LGPLv3 or higher.
  3. import QtQuick 2.7
  4. import QtQuick.Controls 2.15
  5. import UM 1.5 as UM
  6. import Cura 1.7 as Cura
  7. RecommendedSettingSection
  8. {
  9. id: strengthSection
  10. title: catalog.i18nc("@label", "Strength")
  11. icon: UM.Theme.getIcon("Hammer")
  12. enableSectionSwitchVisible: false
  13. enableSectionSwitchEnabled: false
  14. tooltipText: ""
  15. UM.SettingPropertyProvider
  16. {
  17. id: infillSteps
  18. containerStackId: Cura.MachineManager.activeStackId
  19. key: "gradual_infill_steps"
  20. watchedProperties: ["value", "enabled"]
  21. storeIndex: 0
  22. }
  23. contents: [
  24. RecommendedSettingItem
  25. {
  26. settingName: catalog.i18nc("infill_sparse_density description", "Infill Density")
  27. tooltipText: catalog.i18nc("@label", "Adjusts the density of infill of the print.")
  28. settingControl: Cura.SingleSettingSlider
  29. {
  30. height: UM.Theme.getSize("combobox").height
  31. width: parent.width
  32. settingName: "infill_sparse_density"
  33. roundToNearestTen: true
  34. // disable slider when gradual support is enabled
  35. enabled: parseInt(infillSteps.properties.value) == 0
  36. function updateSetting(value)
  37. {
  38. Cura.MachineManager.setSettingForAllExtruders("infill_sparse_density", "value", value)
  39. Cura.MachineManager.resetSettingForAllExtruders("infill_line_distance")
  40. }
  41. }
  42. },
  43. RecommendedSettingItem
  44. {
  45. settingName: catalog.i18nc("@action:label", "Infill Pattern")
  46. tooltipText: catalog.i18nc("infill_pattern description", "The pattern of the infill material of the print. The line and zig zag infill swap direction on alternate layers, reducing material cost. The grid, triangle, tri-hexagon, cubic, octet, quarter cubic, cross and concentric patterns are fully printed every layer. Gyroid, cubic, quarter cubic and octet infill change with every layer to provide a more equal distribution of strength over each direction. Lightning infill tries to minimize the infill, by only supporting the ceiling of the object.")
  47. settingControl: Cura.SingleSettingComboBox
  48. {
  49. width: parent.width
  50. settingName: "infill_pattern"
  51. }
  52. },
  53. RecommendedSettingItem
  54. {
  55. settingName: catalog.i18nc("@action:label", "Shell Thickness")
  56. settingControl: Cura.SingleSettingTextField
  57. {
  58. width: parent.width
  59. settingName: "wall_thickness"
  60. validator: Cura.FloatValidator {}
  61. unitText: catalog.i18nc("@label", "mm")
  62. }
  63. }
  64. ]
  65. }