Skip to content

Commit f225457

Browse files
author
usmfi
committed
rename of key
1 parent 65e3e99 commit f225457

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

pyGCodeDecode/data/default_printer_presets.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ debugging:
4949
# general properties
5050
nozzle_diam: 0.4
5151
filament_diam: 2.85
52-
extrusion_volumetric: True # true: mm3 with UltiGCode, else mm length
52+
volumetric_extrusion: True # true: mm3 with UltiGCode, else mm length
5353
# default settings
5454
p_vel: 85
5555
p_acc: 100

pyGCodeDecode/gcode_interpreter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ def check_initial_setup(self, initial_machine_setup):
623623
"printer_name",
624624
"firmware",
625625
]
626-
optional_keys = ["layer_cue", "nozzle_diam", "filament_diam", "extrusion_volumetric"]
626+
optional_keys = ["layer_cue", "nozzle_diam", "filament_diam", "volumetric_extrusion"]
627627

628628
valid_keys = req_keys + optional_keys
629629

pyGCodeDecode/state_generator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
default_virtual_machine = {
8383
"absolute_position": True,
8484
"absolute_extrusion": True,
85-
"extrusion_volumetric": False,
85+
"volumetric_extrusion": False,
8686
"units": "SI (mm)",
8787
"initial_position": None,
8888
# general properties
@@ -216,7 +216,7 @@ def apply_extrusion(line_dict: dict, virtual_machine: dict, command: str) -> dic
216216
# volumetric to length conversion
217217
# (1) V = (d/2)^2 * pi * E
218218
# (2) E = V / ((d/2)^2 * pi)
219-
if virtual_machine.get("extrusion_volumetric", False):
219+
if virtual_machine.get("volumetric_extrusion", False):
220220
# volumetric extrusion
221221
e_value = e_value / (math.pi * (virtual_machine["filament_diam"] / 2) ** 2)
222222

tests/test_end_to_end.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def test_end_to_end_volumetr():
2020
from pyGCodeDecode.gcode_interpreter import setup, simulation
2121

2222
preset = setup(pathlib.Path("./tests/data/test_printer_setups.yaml"), "test")
23-
preset.set_property({"extrusion_volumetric": False})
23+
preset.set_property({"volumetric_extrusion": False})
2424

2525
sim = simulation(
2626
gcode_path=pathlib.Path("./tests/data/test_state_generator.gcode"),
@@ -32,7 +32,7 @@ def test_end_to_end_volumetr():
3232
assert end_extrusion == expected_extrusion, f"Expected {expected_extrusion}, but got {end_extrusion}"
3333

3434
preset = setup(pathlib.Path("./tests/data/test_printer_setups.yaml"), "test")
35-
preset.set_property({"extrusion_volumetric": True})
35+
preset.set_property({"volumetric_extrusion": True})
3636

3737
sim = simulation(
3838
gcode_path=pathlib.Path("./tests/data/test_state_generator.gcode"),

0 commit comments

Comments
 (0)