Skip to content

Commit

Permalink
Merge branch 'main' into CURA-7913
Browse files Browse the repository at this point in the history
  • Loading branch information
jellespijker committed Aug 9, 2023
2 parents 511f05c + 2aa66b5 commit c898c70
Show file tree
Hide file tree
Showing 112 changed files with 525 additions and 65 deletions.
22 changes: 17 additions & 5 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from conan.tools.scm import Version
from conan.errors import ConanInvalidConfiguration, ConanException

required_conan_version = "<=1.60.0"
required_conan_version = ">=1.54 <=1.56.0 || >=1.58.0 <2.0.0"


class CuraConan(ConanFile):
Expand Down Expand Up @@ -150,9 +150,17 @@ def _generate_about_versions(self, location):
conan_installs.append([dependency.ref.name,dependency.ref.version])

#list of python installs
import pkg_resources
for package in pkg_resources.working_set:
python_installs.append([package.key, package.version])
outer = '"' if self.settings.os == "Windows" else "'"
inner = "'" if self.settings.os == "Windows" else '"'
python_ins_cmd = f"python -c {outer}import pkg_resources; print({inner};{inner}.join([(s.key+{inner},{inner}+ s.version) for s in pkg_resources.working_set])){outer}"
from six import StringIO
buffer = StringIO()
self.run(python_ins_cmd, run_environment= True, env = "conanrun", output=buffer)

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

with open(os.path.join(location, "AboutDialogVersionsList.qml"), "w") as f:
f.write(cura_version_py.render(
Expand Down Expand Up @@ -330,7 +338,7 @@ def generate(self):
vr.generate()

self._generate_cura_version(os.path.join(self.source_folder, "cura"))
self._generate_about_versions(os.path.join(self.source_folder, "resources/qml/Dialogs"))


if self.options.devtools:
entitlements_file = "'{}'".format(os.path.join(self.source_folder, "packaging", "MacOS", "cura.entitlements"))
Expand All @@ -349,6 +357,8 @@ def generate(self):
pot = self.python_requires["translationextractor"].module.ExtractTranslations(self, cpp_info.bindirs[0])
pot.generate()

self._generate_about_versions(os.path.join(self.source_folder, "resources","qml", "Dialogs"))

def build(self):
if self.options.devtools:
if self.settings.os != "Windows" or self.conf.get("tools.microsoft.bash:path", check_type = str):
Expand Down Expand Up @@ -456,13 +466,15 @@ def deploy(self):
save(self, os.path.join(self._script_dir, f"activate_github_actions_version_env{ext}"), activate_github_actions_version_env)

self._generate_cura_version(os.path.join(self._site_packages, "cura"))
self._generate_about_versions(str(self._share_dir.joinpath("cura", "resources", "qml", "Dialogs")))

entitlements_file = "'{}'".format(Path(self.cpp_info.res_paths[2], "MacOS", "cura.entitlements"))
self._generate_pyinstaller_spec(location = self._base_dir,
entrypoint_location = "'{}'".format(os.path.join(self.package_folder, self.cpp_info.bindirs[0], self.conan_data["pyinstaller"]["runinfo"]["entrypoint"])).replace("\\", "\\\\"),
icon_path = "'{}'".format(os.path.join(self.package_folder, self.cpp_info.resdirs[2], self.conan_data["pyinstaller"]["icon"][str(self.settings.os)])).replace("\\", "\\\\"),
entitlements_file = entitlements_file if self.settings.os == "Macos" else "None")


def package(self):
copy(self, "cura_app.py", src = self.source_folder, dst = os.path.join(self.package_folder, self.cpp.package.bindirs[0]))
copy(self, "*", src = os.path.join(self.source_folder, "cura"), dst = os.path.join(self.package_folder, self.cpp.package.libdirs[0]))
Expand Down
29 changes: 29 additions & 0 deletions resources/definitions/anycubic_kobra_plus.def.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"version": 2,
"name": "Anycubic Kobra Plus",
"inherits": "fdmprinter",
"metadata":
{
"visible": true,
"author": "Jordon Brooks",
"manufacturer": "Anycubic",
"file_formats": "text/x-gcode",
"has_machine_quality": true,
"has_materials": true,
"machine_extruder_trains": { "0": "anycubic_kobra_plus_extruder_0" },
"preferred_material": "generic_pla",
"preferred_quality_type": "normal",
"quality_definition": "anycubic_kobra_plus"
},
"overrides":
{
"machine_depth": { "default_value": 302 },
"machine_end_gcode": { "default_value": "M104 S0\nM140 S0\n;Retract the filament\nG92 E1\nG1 E-1 F300\nG28 X0 Y0\nM84\nM355 S0; led off" },
"machine_gcode_flavor": { "default_value": "RepRap (Marlin/Sprinter)" },
"machine_heated_bed": { "default_value": true },
"machine_height": { "default_value": 352 },
"machine_name": { "default_value": "Anycubic Kobra Plus" },
"machine_start_gcode": { "default_value": "G28 ;Home\nG1 Z15.0 F6000 ;Move the platform down 15mm\n;Prime the extruder\nG92 E0\nM355 S1; Turn LED on\n; Add Custom purge lines\nG1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed\nG1 X1.0 Y30 Z0.3 F5000.0 ; Move to start position\nG1 X1.0 Y100.0 Z0.3 F1500.0 E15 ; Draw the first line\nG1 X1.3 Y100.0 Z0.3 F5000.0 ; Move to side a little\nG1 X1.3 Y30 Z0.3 F1500.0 E30 ; Draw the second line\nG92 E0 ; Reset Extruder\nG1 E-2 F500 ; Retract a little \nG1 X50 F500 ; wipe away from the filament line\nG1 X100 F9000 ; Quickly wipe away from the filament line\nG1 Z5.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed\n; End custom purge lines" },
"machine_width": { "default_value": 302 }
}
}
2 changes: 1 addition & 1 deletion resources/definitions/fdmprinter.def.json
Original file line number Diff line number Diff line change
Expand Up @@ -5921,7 +5921,7 @@
"maximum_value_warning": "skirt_brim_line_width",
"enabled": "resolveOrValue('adhesion_type') == 'brim'",
"limit_to_extruder": "skirt_brim_extruder_nr",
"settable_per_mesh": true,
"settable_per_mesh": false,
"settable_per_extruder": true
},
"brim_replaces_support":
Expand Down
16 changes: 16 additions & 0 deletions resources/extruders/anycubic_kobra_plus_extruder_0.def.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"version": 2,
"name": "Extruder 1",
"inherits": "fdmextruder",
"metadata":
{
"machine": "anycubic_kobra_plus",
"position": "0"
},
"overrides":
{
"extruder_nr": { "default_value": 0 },
"machine_nozzle_size": { "default_value": 0.4 },
"material_diameter": { "default_value": 1.75 }
}
}
21 changes: 9 additions & 12 deletions resources/qml/Dialogs/AboutDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,6 @@ UM.Dialog

backgroundColor: UM.Theme.getColor("main_background")

property real dialogX: base.x
property real dialogY: base.y
property int shakeDetected: shakeDetector.shakeIsdetected
property UM.ShakeDetector shakeDetector: UM.ShakeDetector
{
position: Qt.point(base.x, base.y)
}

Rectangle
{
Expand Down Expand Up @@ -58,6 +51,15 @@ UM.Dialog
anchors.horizontalCenter: parent.horizontalCenter

UM.I18nCatalog{id: catalog; name: "cura"}
MouseArea
{
anchors.fill: parent
onClicked:
{
projectsList.visible = !projectsList.visible;
projectBuildInfoList.visible = !projectBuildInfoList.visible;
}
}
}

UM.Label
Expand Down Expand Up @@ -194,11 +196,6 @@ UM.Dialog

}

onShakeDetectedChanged:
{
projectsList.visible = !projectsList.visible;
projectBuildInfoList.visible = !projectBuildInfoList.visible;
}

onVisibleChanged:
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[general]
definition = anycubic_kobra_plus
name = Normal
version = 4

[metadata]
global_quality = True
quality_type = normal
setting_version = 22
type = quality
weight = 0

[values]
infill_pattern = cubic
layer_height = 0.2
layer_height_0 = 0.2
material_final_print_temperature = 195
material_print_temperature = 195
retraction_combing = off
retraction_hop = 0.1
retraction_hop_enabled = True
retraction_hop_only_when_collides = True
speed_infill = 40
speed_layer_0 = 20
speed_print = 80
speed_wall_x = 60
wall_thickness = 1.2

Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,8 @@ weight = 0

[values]
speed_topbottom = =math.ceil(speed_print * 30 / 55)
support_bottom_distance = =support_z_distance
support_interface_enable = True
support_top_distance = =support_z_distance
support_z_distance = =math.ceil(0.3/layer_height)*layer_height

Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,9 @@ weight = 0
[values]
speed_infill = =math.ceil(speed_print * 40 / 55)
speed_topbottom = =math.ceil(speed_print * 30 / 55)
support_bottom_distance = =support_z_distance
support_interface_enable = True
support_top_distance = =support_z_distance
support_z_distance = =math.ceil(0.3/layer_height)*layer_height
top_bottom_thickness = 0.8

Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ retraction_min_travel = 5
speed_print = 70
speed_topbottom = =math.ceil(speed_print * 30 / 70)
speed_wall = =math.ceil(speed_print * 30 / 70)
support_bottom_distance = =support_z_distance
support_interface_enable = True
support_top_distance = =support_z_distance
support_z_distance = =math.ceil(0.3/layer_height)*layer_height
switch_extruder_prime_speed = 30
switch_extruder_retraction_amount = 30
switch_extruder_retraction_speeds = 40
Expand Down
4 changes: 4 additions & 0 deletions resources/quality/ultimaker_s3/um_s3_aa0.25_pc_0.1mm.inst.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ speed_print = 50
speed_topbottom = =math.ceil(speed_print * 25 / 50)
speed_wall = =math.ceil(speed_print * 40 / 50)
speed_wall_0 = =math.ceil(speed_wall * 25 / 40)
support_bottom_distance = =support_z_distance
support_interface_density = 87.5
support_interface_enable = True
support_top_distance = =support_z_distance
support_z_distance = =math.ceil(0.3/layer_height)*layer_height
switch_extruder_prime_speed = 15
switch_extruder_retraction_amount = 20
switch_extruder_retraction_speeds = 35
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,9 @@ weight = 0
material_print_temperature = =default_material_print_temperature - 5
speed_infill = =math.ceil(speed_print * 40 / 55)
speed_topbottom = =math.ceil(speed_print * 30 / 55)
support_bottom_distance = =support_z_distance
support_interface_enable = True
support_top_distance = =support_z_distance
support_z_distance = =math.ceil(0.3/layer_height)*layer_height
top_bottom_thickness = 0.8

Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ retraction_hop = 0.2
speed_print = 30
speed_wall = =math.ceil(speed_print * 25 / 30)
speed_wall_0 = =math.ceil(speed_print * 20 / 30)
support_bottom_distance = =support_z_distance
support_interface_enable = True
support_top_distance = =support_z_distance
support_z_distance = =math.ceil(0.3/layer_height)*layer_height
top_bottom_thickness = 0.72
travel_avoid_distance = 0.4
wall_0_inset = 0.015
Expand Down
4 changes: 4 additions & 0 deletions resources/quality/ultimaker_s3/um_s3_aa0.25_pp_0.1mm.inst.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ speed_print = 25
speed_wall = =math.ceil(speed_print * 25 / 25)
speed_wall_0 = =math.ceil(speed_wall * 25 / 25)
support_angle = 50
support_bottom_distance = =support_z_distance
support_interface_enable = True
support_top_distance = =support_z_distance
support_z_distance = =math.ceil(0.3/layer_height)*layer_height
switch_extruder_prime_speed = 15
switch_extruder_retraction_amount = 20
switch_extruder_retraction_speeds = 35
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ speed_print = 30
speed_topbottom = =math.ceil(speed_print * 20 / 30)
speed_wall = =math.ceil(speed_print * 25 / 30)
speed_wall_0 = =math.ceil(speed_print * 20 / 30)
support_bottom_distance = =support_z_distance
support_interface_enable = True
support_top_distance = =support_z_distance
support_z_distance = =math.ceil(0.3/layer_height)*layer_height
top_bottom_thickness = 0.72
wall_0_inset = 0.015
wall_0_wipe_dist = 0.25
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,8 @@ speed_infill = =math.ceil(speed_print * 40 / 50)
speed_print = 50
speed_topbottom = =math.ceil(speed_print * 30 / 50)
speed_wall = =math.ceil(speed_print * 30 / 50)
support_bottom_distance = =support_z_distance
support_interface_enable = True
support_top_distance = =support_z_distance
support_z_distance = =math.ceil(0.3/layer_height)*layer_height

Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,8 @@ speed_print = 60
speed_topbottom = =math.ceil(speed_print * 30 / 60)
speed_wall = =math.ceil(speed_print * 40 / 60)
speed_wall_0 = =math.ceil(speed_wall * 30 / 40)
support_bottom_distance = =support_z_distance
support_interface_enable = True
support_top_distance = =support_z_distance
support_z_distance = =math.ceil(0.3/layer_height)*layer_height

4 changes: 4 additions & 0 deletions resources/quality/ultimaker_s3/um_s3_aa0.4_abs_0.1mm.inst.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,8 @@ speed_infill = =math.ceil(speed_print * 40 / 55)
speed_print = 55
speed_topbottom = =math.ceil(speed_print * 30 / 55)
speed_wall = =math.ceil(speed_print * 30 / 55)
support_bottom_distance = =support_z_distance
support_interface_enable = True
support_top_distance = =support_z_distance
support_z_distance = =math.ceil(0.3/layer_height)*layer_height

4 changes: 4 additions & 0 deletions resources/quality/ultimaker_s3/um_s3_aa0.4_abs_0.2mm.inst.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,8 @@ speed_print = 60
speed_topbottom = =math.ceil(speed_print * 35 / 60)
speed_wall = =math.ceil(speed_print * 45 / 60)
speed_wall_0 = =math.ceil(speed_wall * 35 / 45)
support_bottom_distance = =support_z_distance
support_interface_enable = True
support_top_distance = =support_z_distance
support_z_distance = =math.ceil(0.3/layer_height)*layer_height

Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ speed_print = 40
speed_topbottom = =math.ceil(speed_print * 30 / 35)
speed_wall = =math.ceil(speed_print * 35 / 40)
speed_wall_0 = =math.ceil(speed_wall * 30 / 35)
support_z_distance = =layer_height
support_bottom_distance = =support_z_distance
support_interface_enable = True
support_top_distance = =support_z_distance
support_z_distance = =math.ceil(0.4/layer_height)*layer_height
wall_0_inset = 0

Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ speed_print = 45
speed_topbottom = =math.ceil(speed_print * 35 / 45)
speed_wall = =math.ceil(speed_print * 45 / 45)
speed_wall_0 = =math.ceil(speed_wall * 35 / 45)
support_z_distance = =layer_height
support_bottom_distance = =support_z_distance
support_interface_enable = True
support_top_distance = =support_z_distance
support_z_distance = =math.ceil(0.4/layer_height)*layer_height
wall_0_inset = 0

Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ speed_print = 40
speed_topbottom = =math.ceil(speed_print * 30 / 35)
speed_wall = =math.ceil(speed_print * 35 / 40)
speed_wall_0 = =math.ceil(speed_wall * 30 / 35)
support_z_distance = =layer_height
support_bottom_distance = =support_z_distance
support_interface_enable = True
support_top_distance = =support_z_distance
support_z_distance = =math.ceil(0.4/layer_height)*layer_height
wall_0_inset = 0

Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ speed_print = 50
speed_topbottom = =math.ceil(speed_print * 40 / 50)
speed_wall = =math.ceil(speed_print * 50 / 50)
speed_wall_0 = =math.ceil(speed_wall * 40 / 50)
support_z_distance = =layer_height
support_bottom_distance = =support_z_distance
support_interface_enable = True
support_top_distance = =support_z_distance
support_z_distance = =math.ceil(0.4/layer_height)*layer_height
wall_0_inset = 0

Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,8 @@ speed_infill = =math.ceil(speed_print * 40 / 50)
speed_print = 50
speed_topbottom = =math.ceil(speed_print * 30 / 50)
speed_wall = =math.ceil(speed_print * 30 / 50)
support_bottom_distance = =support_z_distance
support_interface_enable = True
support_top_distance = =support_z_distance
support_z_distance = =math.ceil(0.3/layer_height)*layer_height

Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,8 @@ speed_print = 60
speed_topbottom = =math.ceil(speed_print * 30 / 60)
speed_wall = =math.ceil(speed_print * 40 / 60)
speed_wall_0 = =math.ceil(speed_wall * 30 / 40)
support_bottom_distance = =support_z_distance
support_interface_enable = True
support_top_distance = =support_z_distance
support_z_distance = =math.ceil(0.3/layer_height)*layer_height

4 changes: 4 additions & 0 deletions resources/quality/ultimaker_s3/um_s3_aa0.4_cpe_0.1mm.inst.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,8 @@ speed_infill = =math.ceil(speed_print * 45 / 55)
speed_print = 55
speed_topbottom = =math.ceil(speed_print * 30 / 55)
speed_wall = =math.ceil(speed_print * 30 / 55)
support_bottom_distance = =support_z_distance
support_interface_enable = True
support_top_distance = =support_z_distance
support_z_distance = =math.ceil(0.3/layer_height)*layer_height

4 changes: 4 additions & 0 deletions resources/quality/ultimaker_s3/um_s3_aa0.4_cpe_0.2mm.inst.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,8 @@ speed_print = 60
speed_topbottom = =math.ceil(speed_print * 35 / 60)
speed_wall = =math.ceil(speed_print * 45 / 60)
speed_wall_0 = =math.ceil(speed_wall * 35 / 45)
support_bottom_distance = =support_z_distance
support_interface_enable = True
support_top_distance = =support_z_distance
support_z_distance = =math.ceil(0.3/layer_height)*layer_height

Loading

0 comments on commit c898c70

Please sign in to comment.