RecommendedStrengthSelector.qml 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. // Copyright (c) 2022 UltiMaker
  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 QtQuick.Layouts 2.10
  6. import UM 1.7 as UM
  7. import Cura 1.7 as Cura
  8. RecommendedSettingSection
  9. {
  10. id: strengthSection
  11. title: catalog.i18nc("@label", "Strength")
  12. icon: UM.Theme.getIcon("Hammer")
  13. enableSectionSwitchVisible: false
  14. enableSectionSwitchEnabled: false
  15. tooltipText: catalog.i18nc("@label", "The following settings define the strength of your part.")
  16. UM.SettingPropertyProvider
  17. {
  18. id: infillSteps
  19. containerStackId: Cura.MachineManager.activeStackId
  20. key: "gradual_infill_steps"
  21. watchedProperties: ["value", "enabled"]
  22. storeIndex: 0
  23. }
  24. contents: [
  25. RecommendedSettingItem
  26. {
  27. settingName: catalog.i18nc("infill_sparse_density description", "Infill Density")
  28. tooltipText: catalog.i18nc("@label", "Adjusts the density of infill of the print.")
  29. settingControl: Cura.SingleSettingSlider
  30. {
  31. height: UM.Theme.getSize("combobox").height
  32. width: parent.width
  33. settingName: "infill_sparse_density"
  34. updateAllExtruders: true
  35. // disable slider when gradual support is enabled
  36. enabled: parseInt(infillSteps.properties.value) === 0
  37. function updateSetting(value)
  38. {
  39. Cura.MachineManager.setSettingForAllExtruders("infill_sparse_density", "value", value)
  40. Cura.MachineManager.resetSettingForAllExtruders("infill_line_distance")
  41. }
  42. }
  43. },
  44. RecommendedSettingItem
  45. {
  46. settingName: catalog.i18nc("@action:label", "Infill Pattern")
  47. tooltipText: catalog.i18nc("@label",
  48. "The pattern of the infill material of the print:\n\nFor quick prints of non functional model choose line, zig zag or lightning infill.\n\nFor functional part not subjected to a lot of stress we recommend grid or triangle or tri hexagon.\n\nFor functional 3D prints which require high strength in multiple directions use cubic, cubic subdivision, quarter cubic, octet, and gyroid.")
  49. settingControl: Cura.SingleSettingComboBox
  50. {
  51. width: parent.width
  52. settingName: "infill_pattern"
  53. updateAllExtruders: true
  54. }
  55. },
  56. RecommendedSettingItem
  57. {
  58. settingName: catalog.i18nc("@action:label", "Shell Thickness")
  59. tooltipText: catalog.i18nc("@label", "Defines the thickness of your part side walls, roof and floor.")
  60. settingControl: RowLayout
  61. {
  62. anchors.fill: parent
  63. spacing: UM.Theme.getSize("default_margin").width
  64. UM.ComponentWithIcon
  65. {
  66. Layout.fillWidth: true
  67. source: UM.Theme.getIcon("PrintWalls")
  68. Cura.SingleSettingTextField
  69. {
  70. width: parent.width
  71. settingName: "wall_thickness"
  72. updateAllExtruders: true
  73. validator: UM.FloatValidator {}
  74. unitText: catalog.i18nc("@label", "mm")
  75. }
  76. }
  77. UM.ComponentWithIcon
  78. {
  79. Layout.fillWidth: true
  80. source: UM.Theme.getIcon("PrintTopBottom")
  81. Cura.SingleSettingTextField
  82. {
  83. width: parent.width
  84. settingName: "top_bottom_thickness"
  85. updateAllExtruders: true
  86. validator: UM.FloatValidator {}
  87. unitText: catalog.i18nc("@label", "mm")
  88. }
  89. }
  90. }
  91. }
  92. ]
  93. }