Skip to content

Commit

Permalink
Merge branch 'main' into CURA-7647-play-simulation-time-dependent
Browse files Browse the repository at this point in the history
  • Loading branch information
saumyaj3 authored Nov 8, 2023
2 parents 457cecb + b8deb31 commit f58500d
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 10 deletions.
4 changes: 1 addition & 3 deletions CuraVersion.py.jinja
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Copyright (c) 2023 UltiMaker
# Cura is released under the terms of the LGPLv3 or higher.

from pkg_resources import working_set

CuraAppName = "{{ cura_app_name }}"
CuraAppDisplayName = "{{ cura_app_display_name }}"
CuraVersion = "{{ cura_version }}"
Expand All @@ -16,4 +14,4 @@ CuraDigitalFactoryURL = "{{ cura_digital_factory_url }}"
CuraLatestURL = "{{ cura_latest_url }}"

ConanInstalls = {{ conan_installs }}
PythonInstalls = {package.key: {'version': package.version} for package in working_set}
PythonInstalls = {{ python_installs }}
18 changes: 18 additions & 0 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,23 @@ def _conan_installs(self):
}
return conan_installs

def _python_installs(self):
python_installs = {}

# list of python installs
python_ins_cmd = f"python -c \"import pkg_resources; print(';'.join([(s.key+','+ s.version) for s in pkg_resources.working_set]))\""
from six import StringIO
buffer = StringIO()
self.run(python_ins_cmd, run_environment= True, env = "conanrun", output=buffer)

packages = str(buffer.getvalue()).split("-----------------\n")
packages = packages[1].strip('\r\n').split(";")
for package in packages:
name, version = package.split(",")
python_installs[name] = {"version": version}

return python_installs

def _generate_cura_version(self, location):
with open(os.path.join(self.recipe_folder, "CuraVersion.py.jinja"), "r") as f:
cura_version_py = Template(f.read())
Expand All @@ -178,6 +195,7 @@ def _generate_cura_version(self, location):
cura_digital_factory_url = self.conan_data["urls"][self._urls]["digital_factory_url"],
cura_latest_url=self.conan_data["urls"][self._urls]["cura_latest_url"],
conan_installs=self._conan_installs(),
python_installs=self._python_installs(),
))

def _generate_pyinstaller_spec(self, location, entrypoint_location, icon_path, entitlements_file):
Expand Down
6 changes: 3 additions & 3 deletions plugins/MakerbotWriter/MakerbotWriter.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ def __init__(self) -> None:
]
_META_VERSION = "3.0.0"
_PRINT_NAME_MAP = {
"Makerbot Method": "fire_e",
"Makerbot Method X": "lava_f",
"Makerbot Method XL": "magma_10",
"UltiMaker Method": "fire_e",
"UltiMaker Method X": "lava_f",
"UltiMaker Method XL": "magma_10",
}
_EXTRUDER_NAME_MAP = {
"1XA": "mk14_hot",
Expand Down
2 changes: 1 addition & 1 deletion resources/definitions/ultimaker_method_base.def.json
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@
"machine_heated_bed": { "default_value": false },
"machine_heated_build_volume": { "default_value": true },
"machine_min_cool_heat_time_window": { "value": 15 },
"machine_name": { "default_value": "Makerbot Method" },
"machine_name": { "default_value": "UltiMaker Method" },
"machine_nozzle_cool_down_speed": { "value": 0.8 },
"machine_nozzle_heat_up_speed": { "value": 3.5 },
"machine_start_gcode": { "default_value": "" },
Expand Down
2 changes: 1 addition & 1 deletion resources/definitions/ultimaker_methodx.def.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
]
},
"machine_height": { "default_value": 196 },
"machine_name": { "default_value": "Makerbot Method X" },
"machine_name": { "default_value": "UltiMaker Method X" },
"machine_width": { "default_value": 283.3 },
"prime_tower_position_x": { "value": "(150 / 2 + resolveOrValue('prime_tower_size') / 2) if resolveOrValue('machine_shape') == 'elliptic' else (150 - (resolveOrValue('prime_tower_base_size') if (resolveOrValue('adhesion_type') == 'raft' or resolveOrValue('prime_tower_brim_enable')) else 0) - max(max(extruderValues('travel_avoid_distance')) + max(extruderValues('support_offset')) + (extruderValue(skirt_brim_extruder_nr, 'skirt_brim_line_width') * extruderValue(skirt_brim_extruder_nr, 'skirt_line_count') * extruderValue(skirt_brim_extruder_nr, 'initial_layer_line_width_factor') / 100 + extruderValue(skirt_brim_extruder_nr, 'skirt_gap') if resolveOrValue('adhesion_type') == 'skirt' else 0) + (resolveOrValue('draft_shield_dist') if resolveOrValue('draft_shield_enabled') else 0), max(map(abs, extruderValues('machine_nozzle_offset_x'))), 1)) - (150 / 2 if resolveOrValue('machine_center_is_zero') else 0)" },
"prime_tower_position_y": { "value": "190 - prime_tower_size - (resolveOrValue('prime_tower_base_size') if (resolveOrValue('adhesion_type') == 'raft' or resolveOrValue('prime_tower_brim_enable')) else 0) - max(max(extruderValues('travel_avoid_distance')) + max(extruderValues('support_offset')) + (extruderValue(skirt_brim_extruder_nr, 'skirt_brim_line_width') * extruderValue(skirt_brim_extruder_nr, 'skirt_line_count') * extruderValue(skirt_brim_extruder_nr, 'initial_layer_line_width_factor') / 100 + extruderValue(skirt_brim_extruder_nr, 'skirt_gap') if resolveOrValue('adhesion_type') == 'skirt' else 0) + (resolveOrValue('draft_shield_dist') if resolveOrValue('draft_shield_enabled') else 0), max(map(abs, extruderValues('machine_nozzle_offset_y'))), 1) - (190 / 2 if resolveOrValue('machine_center_is_zero') else 0)" }
Expand Down
2 changes: 1 addition & 1 deletion resources/definitions/ultimaker_methodxl.def.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
},
"machine_heated_bed": { "default_value": true },
"machine_height": { "default_value": 317 },
"machine_name": { "default_value": "Makerbot Method XL" },
"machine_name": { "default_value": "UltiMaker Method XL" },
"machine_width": { "default_value": 410 },
"material_shrinkage_percentage_z": { "resolve": "sum(extruderValues(\"material_shrinkage_percentage_z\")) / len(extruderValues(\"material_shrinkage_percentage_z\"))" },
"prime_tower_position_x": { "value": "(305 - (resolveOrValue('prime_tower_base_size') if (resolveOrValue('adhesion_type') == 'raft' or resolveOrValue('prime_tower_brim_enable')) else 0) - max(max(extruderValues('travel_avoid_distance')) + max(extruderValues('support_offset')) + (extruderValue(skirt_brim_extruder_nr, 'skirt_brim_line_width') * extruderValue(skirt_brim_extruder_nr, 'skirt_line_count') * extruderValue(skirt_brim_extruder_nr, 'initial_layer_line_width_factor') / 100 + extruderValue(skirt_brim_extruder_nr, 'skirt_gap') if resolveOrValue('adhesion_type') == 'skirt' else 0) + (resolveOrValue('draft_shield_dist') if resolveOrValue('draft_shield_enabled') else 0), max(map(abs, extruderValues('machine_nozzle_offset_x'))), 1)) - (305 / 2)" },
Expand Down
5 changes: 4 additions & 1 deletion resources/qml/Dialogs/AboutDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ UM.Dialog
width: Math.floor(base.width * 0.85)
height: Math.floor(width * UM.Theme.getSize("logo").height / UM.Theme.getSize("logo").width)
source: UM.Theme.getImage("logo")
sourceSize.width: width
sourceSize.height: height
fillMode: Image.PreserveAspectFit

anchors.centerIn: parent
Expand Down Expand Up @@ -107,9 +109,10 @@ UM.Dialog

Flickable
{
id: scroll
anchors.fill: parent
ScrollBar.vertical: UM.ScrollBar {
visible: contentHeight > height
visible: scroll.contentHeight > height
}
contentHeight: content.height
clip: true
Expand Down
1 change: 1 addition & 0 deletions resources/qml/Menus/MaterialMenu.qml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ Cura.Menu
{
id: genericMenu
title: catalog.i18nc("@label:category menu label", "Generic")
enabled: genericMaterialsModel.items.length > 0

Instantiator
{
Expand Down

0 comments on commit f58500d

Please sign in to comment.