From 945de50ca8407bc6416d74c02ad7b0e749914d6c Mon Sep 17 00:00:00 2001 From: daid Date: Wed, 19 Jun 2013 10:49:28 +0200 Subject: [PATCH] Add support for zero insets. --- Cura/util/profile.py | 6 ++++-- Cura/util/validators.py | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Cura/util/profile.py b/Cura/util/profile.py index 4362f630..261406d0 100644 --- a/Cura/util/profile.py +++ b/Cura/util/profile.py @@ -112,7 +112,7 @@ class setting(object): ## Settings ######################################################### setting('layer_height', 0.1, float, 'basic', 'Quality').setRange(0.0001).setLabel('Layer height (mm)', 'Layer height in millimeters.\nThis is the most important setting to determen the quality of your print. Normal quality prints are 0.1mm, high quality is 0.06mm. You can go up to 0.25mm with an Ultimaker for very fast prints at low quality.') -setting('wall_thickness', 0.8, float, 'basic', 'Quality').setRange(0.0001).setLabel('Shell thickness (mm)', 'Thickness of the outside shell in the horizontal direction.\nThis is used in combination with the nozzle size to define the number\nof perimeter lines and the thickness of those perimeter lines.') +setting('wall_thickness', 0.8, float, 'basic', 'Quality').setRange(0.0).setLabel('Shell thickness (mm)', 'Thickness of the outside shell in the horizontal direction.\nThis is used in combination with the nozzle size to define the number\nof perimeter lines and the thickness of those perimeter lines.') setting('retraction_enable', False, bool, 'basic', 'Quality').setLabel('Enable retraction', 'Retract the filament when the nozzle is moving over a none-printed area. Details about the retraction can be configured in the advanced tab.') setting('solid_layer_thickness', 0.6, float, 'basic', 'Fill').setRange(0).setLabel('Bottom/Top thickness (mm)', 'This controls the thickness of the bottom and top layers, the amount of solid layers put down is calculated by the layer thickness and this value.\nHaving this value a multiply of the layer thickness makes sense. And keep it near your wall thickness to make an evenly strong part.') setting('fill_density', 20, float, 'basic', 'Fill').setRange(0, 100).setLabel('Fill Density (%)', 'This controls how densely filled the insides of your print will be. For a solid part use 100%, for an empty part use 0%. A value around 20% is usually enough.\nThis won\'t effect the outside of the print and only adjusts how strong the part becomes.') @@ -615,7 +615,9 @@ def calculateEdgeWidth(): def calculateLineCount(): wallThickness = getProfileSettingFloat('wall_thickness') nozzleSize = getProfileSettingFloat('nozzle_size') - + + if wallThickness < 0.01: + return 0 if wallThickness < nozzleSize: return 1 diff --git a/Cura/util/validators.py b/Cura/util/validators.py index 4a072905..ed4262cf 100644 --- a/Cura/util/validators.py +++ b/Cura/util/validators.py @@ -76,6 +76,8 @@ class wallThicknessValidator(object): try: wallThickness = profile.getProfileSettingFloat('wall_thickness') nozzleSize = profile.getProfileSettingFloat('nozzle_size') + if wallThickness < 0.01: + return SUCCESS, '' if wallThickness <= nozzleSize * 0.5: return ERROR, 'Trying to print walls thinner then the half of your nozzle size, this will not produce anything usable' if wallThickness <= nozzleSize * 0.85: -- 2.30.2