Skip to content

Commit

Permalink
V2.1.4
Browse files Browse the repository at this point in the history
Correction on Error Message
  • Loading branch information
5axes committed Aug 22, 2022
1 parent 42a22fc commit 2557cc0
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 12 deletions.
47 changes: 36 additions & 11 deletions CalibrationShapes.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
# : Same for fill_outline_gaps Print Thin Walls
# V2.1.2 : Supress the function
# V2.1.3 : Modification RetractTower + New TempTowerPC
# V2.1.4 : Change for compatibility on Message Text
#-------------------------------------------------------------------------------------------

VERSION_QT5 = False
Expand Down Expand Up @@ -604,8 +605,12 @@ def _checkRetract(self, val):
key="retraction_enable"
definition_key=key + " label"
untranslated_label=extruder_stack.getProperty(key,"label")
translated_label=i18n_catalog.i18nc(definition_key, untranslated_label)
Message(text = "! Modification ! in the current profile of : " + translated_label + "\nNew value : %s" % (str(val)), title = catalog.i18nc("@info:title", "Warning ! Calibration Shapes"), message_type = Message.MessageType.WARNING).show()
translated_label=i18n_catalog.i18nc(definition_key, untranslated_label)
if self.Major == 4 and self.Minor < 11 :
Message(text = "! Modification ! in the current profile of : " + translated_label + "\nNew value : %s" % (str(val)), title = catalog.i18nc("@info:title", "Warning ! Calibration Shapes")).show()
else :
Message(text = "! Modification ! in the current profile of : " + translated_label + "\nNew value : %s" % (str(val)), title = catalog.i18nc("@info:title", "Warning ! Calibration Shapes"), message_type = Message.MessageType.WARNING).show()

# Define retraction_enable
extruder.setProperty("retraction_enable", "value", True)

Expand All @@ -617,8 +622,12 @@ def _checkRetract(self, val):
key="retraction_amount"
definition_key=key + " label"
untranslated_label=extruder_stack.getProperty(key,"label")
translated_label=i18n_catalog.i18nc(definition_key, untranslated_label)
Message(text = "! Modification ! in the current profile of : " + translated_label + "\nNew value : %s" % (str(1.0)), title = catalog.i18nc("@info:title", "Warning ! Calibration Shapes"), message_type = Message.MessageType.WARNING).show()
translated_label=i18n_catalog.i18nc(definition_key, untranslated_label)
if self.Major == 4 and self.Minor < 11 :
Message(text = "! Modification ! in the current profile of : " + translated_label + "\nNew value : %s" % (str(1.0)), title = catalog.i18nc("@info:title", "Warning ! Calibration Shapes")).show()
else :
Message(text = "! Modification ! in the current profile of : " + translated_label + "\nNew value : %s" % (str(1.0)), title = catalog.i18nc("@info:title", "Warning ! Calibration Shapes"), message_type = Message.MessageType.WARNING).show()

# Define retraction_amount
extruder.setProperty("retraction_amount", "value", 1.0)

Expand All @@ -638,8 +647,10 @@ def _checkAdaptativ(self, val):
definition_key=key + " label"
untranslated_label=extruder_stack.getProperty(key,"label")
translated_label=i18n_catalog.i18nc(definition_key, untranslated_label)

Message(text = "! Modification ! in the current profile of : " + translated_label + "\nNew value : %s" % (str(val)), title = catalog.i18nc("@info:title", "Warning ! Calibration Shapes"), message_type = Message.MessageType.WARNING).show()
if self.Major == 4 and self.Minor < 11 :
Message(text = "! Modification ! in the current profile of : " + translated_label + "\nNew value : %s" % (str(val)), title = catalog.i18nc("@info:title", "Warning ! Calibration Shapes")).show()
else :
Message(text = "! Modification ! in the current profile of : " + translated_label + "\nNew value : %s" % (str(val)), title = catalog.i18nc("@info:title", "Warning ! Calibration Shapes"), message_type = Message.MessageType.WARNING).show()
# Define adaptive_layer
global_container_stack.setProperty("adaptive_layer_height_enabled", "value", False)

Expand All @@ -663,7 +674,11 @@ def _checkAllRemoveHoles(self, val)-> bool:
definition_key=key + " label"
untranslated_label=extruder_stack.getProperty(key,"label")
translated_label=i18n_catalog.i18nc(definition_key, untranslated_label)
Message(text = "Individual definition for the calibration part of : " + translated_label + "\n(machine_nozzle_size>0.4)\nSet value : %s" % (str(True)), title = catalog.i18nc("@info:title", "Information ! Calibration Shapes"), message_type = Message.MessageType.POSITIVE).show()
if self.Major == 4 and self.Minor < 11 :
Message(text = "Individual definition for the calibration part of : " + translated_label + "\n(machine_nozzle_size>0.4)\nSet value : %s" % (str(True)), title = catalog.i18nc("@info:title", "Information ! Calibration Shapes")).show()
else :
Message(text = "Individual definition for the calibration part of : " + translated_label + "\n(machine_nozzle_size>0.4)\nSet value : %s" % (str(True)), title = catalog.i18nc("@info:title", "Information ! Calibration Shapes"), message_type = Message.MessageType.POSITIVE).show()

# Define adaptive_layer
# extruder.setProperty("meshfix_union_all_remove_holes", "value", True)
return _Remove
Expand All @@ -683,7 +698,11 @@ def _checkThinWalls(self, val)-> bool:
definition_key=key + " label"
untranslated_label=extruder_stack.getProperty(key,"label")
translated_label=i18n_catalog.i18nc(definition_key, untranslated_label)
Message(text = "Individual definition for the calibration part of : " + translated_label + "\nSet value : %s" % (str(val)), title = catalog.i18nc("@info:title", "Information ! Calibration Shapes"), message_type = Message.MessageType.POSITIVE).show()
if self.Major == 4 and self.Minor < 11 :
Message(text = "Individual definition for the calibration part of : " + translated_label + "\nSet value : %s" % (str(val)), title = catalog.i18nc("@info:title", "Information ! Calibration Shapes")).show()
else :
Message(text = "Individual definition for the calibration part of : " + translated_label + "\nSet value : %s" % (str(val)), title = catalog.i18nc("@info:title", "Information ! Calibration Shapes"), message_type = Message.MessageType.POSITIVE).show()

thin_wall = val
# global_container_stack.setProperty("fill_outline_gaps", "value", val)

Expand All @@ -703,16 +722,22 @@ def _checkFill_Perimeter_Gaps(self, val):
key="fill_perimeter_gaps"
definition_key=key + " label"
untranslated_label=extruder_stack.getProperty(key,"label")
translated_label=i18n_catalog.i18nc(definition_key, untranslated_label)
Message(text = "! Modification ! in the current profile of : " + translated_label + "\nNew value : %s" % (str(val)), title = catalog.i18nc("@info:title", "Warning ! Calibration Shapes"), message_type = Message.MessageType.WARNING).show()
translated_label=i18n_catalog.i18nc(definition_key, untranslated_label)
if self.Major == 4 and self.Minor < 11 :
Message(text = "! Modification ! in the current profile of : " + translated_label + "\nNew value : %s" % (str(val)), title = catalog.i18nc("@info:title", "Warning ! Calibration Shapes")).show()
else :
Message(text = "! Modification ! in the current profile of : " + translated_label + "\nNew value : %s" % (str(val)), title = catalog.i18nc("@info:title", "Warning ! Calibration Shapes"), message_type = Message.MessageType.WARNING).show()
# Define adaptive_layer
global_container_stack.setProperty("fill_perimeter_gaps", "value", val)

extruder = global_container_stack.extruderList[0]
fill_perimeter_gaps = extruder.getProperty("fill_perimeter_gaps", "value")

if fill_perimeter_gaps != val :
Message(text = "! Modification ! for the extruder definition of : " + translated_label + "\nNew value : %s" % (str(val)), title = catalog.i18nc("@info:title", "Warning ! Calibration Shapes"), message_type = Message.MessageType.WARNING).show()
if self.Major == 4 and self.Minor < 11 :
Message(text = "! Modification ! for the extruder definition of : " + translated_label + "\nNew value : %s" % (str(val)), title = catalog.i18nc("@info:title", "Warning ! Calibration Shapes")).show()
else :
Message(text = "! Modification ! for the extruder definition of : " + translated_label + "\nNew value : %s" % (str(val)), title = catalog.i18nc("@info:title", "Warning ! Calibration Shapes"), message_type = Message.MessageType.WARNING).show()
# Define adaptive_layer
extruder.setProperty("fill_perimeter_gaps", "value", val)

Expand Down
2 changes: 1 addition & 1 deletion plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Calibration Shapes",
"author": "5axes",
"version": "2.1.3",
"version": "2.1.4",
"description": "Adds test parts and simple shapes to the build plate",
"api": 7,
"supported_sdk_versions": ["7.0.0", "7.1.0", "7.2.0", "7.3.0", "7.4.0", "7.5.0", "7.6.0", "7.7.0", "7.8.0", "7.9.0", "8.0.0"],
Expand Down

0 comments on commit 2557cc0

Please sign in to comment.