Skip to content

Commit 22797d2

Browse files
authored
Feature/walls direction (#169)
* feat: add option to choose walls direction * fix: ruff check
1 parent 4b38e90 commit 22797d2

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

settings.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ slicing:
110110
overlapping_infill_percentage: 100.0
111111
overlapping_infill_lid_percentage: 60.0
112112
random_layer_start: false
113+
is_wall_outside_in: true
113114
planes_contact_with_nozzle: ""
114115
print_speed: 50
115116
print_speed_layer1: 50

src/locales.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ class Locale:
9292
SupportsSettings = "Supports settings"
9393
MaterialShrinkage = "Material shrinkage, %:"
9494
RandomLayerStart = "Random layer start"
95+
IsWallsOutsideIn = "Printing walls from outside in"
9596
FlowRate = "Flow rate, %:"
9697
PressureAdvance = "Pressure advance"
9798
PressureAdvanceValue = "Pressure advance value"
@@ -257,6 +258,7 @@ def __init__(self, **entries):
257258
SupportsSettings="Настройки поддержек",
258259
MaterialShrinkage="Величина усадки материала, %:",
259260
RandomLayerStart="Спрятать шов",
261+
IsWallsOutsideIn="Печать стенок снаружи внутрь",
260262
FlowRate="Коэффициент потока расплава, %:",
261263
PressureAdvance="Управление давлением расплава",
262264
PressureAdvanceValue="Коэффициент управления давлением",

src/settings_widget.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ class SettingsWidget(QWidget):
6363
"pressure_advance_on",
6464
"pressure_advance_rate",
6565
"random_layer_start",
66+
"is_wall_outside_in",
6667
# TODO: add separate dummy setting to mark the beginning of supports settings
6768
"supports_on",
6869
"support_density",
@@ -131,6 +132,7 @@ def __init__(self, parent=None, settings_provider: callable = None):
131132
"retraction_compensation": self.locale.RetractCompensationAmount,
132133
"material_shrinkage": self.locale.MaterialShrinkage,
133134
"random_layer_start": self.locale.RandomLayerStart,
135+
"is_wall_outside_in": self.locale.IsWallsOutsideIn,
134136
# TODO: add separate dummy setting to mark the beginning of supports settings
135137
"supports_on": self.locale.SupportsOn,
136138
"support_density": self.locale.SupportDensity,
@@ -1031,6 +1033,27 @@ def on_change():
10311033
"label": rls_on_label,
10321034
"checkbox": rls_on_box,
10331035
}
1036+
elif name == "is_wall_outside_in":
1037+
self.ensure_sett("slicing.is_wall_outside_in")
1038+
1039+
wall_outside_in_label = QLabel(self.locale.IsWallsOutsideIn)
1040+
wall_outside_in_box = QCheckBox()
1041+
if self.sett().slicing.is_wall_outside_in:
1042+
wall_outside_in_box.setCheckState(QtCore.Qt.Checked)
1043+
self.panel.addWidget(wall_outside_in_label, self.next_row, 1)
1044+
self.panel.addWidget(
1045+
wall_outside_in_box, self.cur_row, 2, 1, self.col2_cells
1046+
)
1047+
1048+
def on_change():
1049+
self.sett().slicing.is_wall_outside_in = wall_outside_in_box.isChecked()
1050+
1051+
wall_outside_in_box.stateChanged.connect(on_change)
1052+
1053+
self.__elements[name] = {
1054+
"label": wall_outside_in_label,
1055+
"checkbox": wall_outside_in_box,
1056+
}
10341057
elif name == "flow_rate":
10351058
self.ensure_sett("slicing.flow_rate")
10361059

0 commit comments

Comments
 (0)