diff --git a/cura/ConvexHullDecorator.py b/cura/ConvexHullDecorator.py index 51b22755dd..70f77d9712 100644 --- a/cura/ConvexHullDecorator.py +++ b/cura/ConvexHullDecorator.py @@ -257,7 +257,11 @@ class ConvexHullDecorator(SceneNodeDecorator): # \return New Polygon instance that is offset with everything that # influences the collision area. def _offsetHull(self, convex_hull): - horizontal_expansion = self._getSettingProperty("xy_offset", "value") + horizontal_expansion = max( + self._getSettingProperty("xy_offset", "value"), + self._getSettingProperty("xy_offset_layer_0", "value") + ) + mold_width = 0 if self._getSettingProperty("mold_enabled", "value"): mold_width = self._getSettingProperty("mold_width", "value") @@ -332,4 +336,4 @@ class ConvexHullDecorator(SceneNodeDecorator): ## Settings that change the convex hull. # # If these settings change, the convex hull should be recalculated. - _influencing_settings = {"xy_offset", "mold_enabled", "mold_width"} + _influencing_settings = {"xy_offset", "xy_offset_layer_0", "mold_enabled", "mold_width"} diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index c0d5419a8f..a3642cf897 100755 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1136,6 +1136,19 @@ "limit_to_extruder": "wall_0_extruder_nr", "settable_per_mesh": true }, + "xy_offset_layer_0": + { + "label": "Initial Layer Horizontal Expansion", + "description": "Amount of offset applied to all polygons in the first layer. A negative value can compensate for squishing of the first layer known as \"elephant's foot\".", + "unit": "mm", + "type": "float", + "minimum_value_warning": "-1", + "maximum_value_warning": "1", + "default_value": 0, + "value": "xy_offset", + "limit_to_extruder": "wall_0_extruder_nr", + "settable_per_mesh": true + }, "z_seam_type": { "label": "Z Seam Alignment",