Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbubnikv <bubnikv@gmail.com>2017-07-20 14:38:10 +0300
committerbubnikv <bubnikv@gmail.com>2017-07-20 14:38:10 +0300
commit969e3f4a80552a2fce08537c34250d6d34135e08 (patch)
treee03153759dea69f18c15a2fe25795cf5e73a9d36
parent7103fa78ff732c2b8a23ec83937740119fc4044c (diff)
Fixed "Fill angle of any number other than an Integer does not work"
https://github.com/prusa3d/Slic3r/issues/427 Also enabled floating point rotation angle for supports.
-rw-r--r--xs/src/libslic3r/PrintConfig.cpp10
-rw-r--r--xs/src/libslic3r/PrintConfig.hpp2
-rw-r--r--xs/src/libslic3r/SupportMaterial.cpp8
3 files changed, 10 insertions, 10 deletions
diff --git a/xs/src/libslic3r/PrintConfig.cpp b/xs/src/libslic3r/PrintConfig.cpp
index df9837107..004286224 100644
--- a/xs/src/libslic3r/PrintConfig.cpp
+++ b/xs/src/libslic3r/PrintConfig.cpp
@@ -464,9 +464,9 @@ PrintConfigDef::PrintConfigDef()
def->category = "Infill";
def->tooltip = "Default base angle for infill orientation. Cross-hatching will be applied to this. Bridges will be infilled using the best direction Slic3r can detect, so this setting does not affect them.";
def->sidetext = "°";
- def->cli = "fill-angle=i";
+ def->cli = "fill-angle=f";
def->min = 0;
- def->max = 359;
+ def->max = 360;
def->default_value = new ConfigOptionFloat(45);
def = this->add("fill_density", coPercent);
@@ -1338,15 +1338,15 @@ PrintConfigDef::PrintConfigDef()
// Default is half the external perimeter width.
def->default_value = new ConfigOptionFloatOrPercent(50, true);
- def = this->add("support_material_angle", coInt);
+ def = this->add("support_material_angle", coFloat);
def->label = "Pattern angle";
def->category = "Support material";
def->tooltip = "Use this setting to rotate the support material pattern on the horizontal plane.";
def->sidetext = "°";
- def->cli = "support-material-angle=i";
+ def->cli = "support-material-angle=f";
def->min = 0;
def->max = 359;
- def->default_value = new ConfigOptionInt(0);
+ def->default_value = new ConfigOptionFloat(0);
def = this->add("support_material_buildplate_only", coBool);
def->label = "Support on build plate only";
diff --git a/xs/src/libslic3r/PrintConfig.hpp b/xs/src/libslic3r/PrintConfig.hpp
index 29e829ea1..5620a2f42 100644
--- a/xs/src/libslic3r/PrintConfig.hpp
+++ b/xs/src/libslic3r/PrintConfig.hpp
@@ -176,7 +176,7 @@ public:
// ConfigOptionFloat seam_preferred_direction;
// ConfigOptionFloat seam_preferred_direction_jitter;
ConfigOptionBool support_material;
- ConfigOptionInt support_material_angle;
+ ConfigOptionFloat support_material_angle;
ConfigOptionBool support_material_buildplate_only;
ConfigOptionFloat support_material_contact_distance;
ConfigOptionInt support_material_enforce_layers;
diff --git a/xs/src/libslic3r/SupportMaterial.cpp b/xs/src/libslic3r/SupportMaterial.cpp
index 7f99de906..7b3d3ec0b 100644
--- a/xs/src/libslic3r/SupportMaterial.cpp
+++ b/xs/src/libslic3r/SupportMaterial.cpp
@@ -948,7 +948,7 @@ PrintObjectSupportMaterial::MyLayersPtr PrintObjectSupportMaterial::top_contact_
slices_margin_cached,
// How much to offset the extracted contour outside of the grid.
m_object_config->support_material_spacing.value + m_support_material_flow.spacing(),
- Geometry::deg2rad(double(m_object_config->support_material_angle)));
+ Geometry::deg2rad(m_object_config->support_material_angle));
// 1) infill polygons, expand them by half the extrusion width + a tiny bit of extra.
new_layer.polygons = support_grid_pattern.extract_support(m_support_material_flow.scaled_spacing()/2 + 5);
// 2) Contact polygons will be projected down. To keep the interface and base layers to grow, return a contour a tiny bit smaller than the grid cells.
@@ -1155,7 +1155,7 @@ PrintObjectSupportMaterial::MyLayersPtr PrintObjectSupportMaterial::bottom_conta
trimming,
// How much to offset the extracted contour outside of the grid.
m_object_config->support_material_spacing.value + m_support_material_flow.spacing(),
- Geometry::deg2rad(double(m_object_config->support_material_angle)));
+ Geometry::deg2rad(m_object_config->support_material_angle));
tbb::task_group task_group_inner;
// 1) Cache the slice of a support volume. The support volume is expanded by 1/2 of support material flow spacing
// to allow a placement of suppot zig-zag snake along the grid lines.
@@ -2472,7 +2472,7 @@ void PrintObjectSupportMaterial::generate_toolpaths(
loop_interface_processor.n_contact_loops = this->has_contact_loops() ? 1 : 0;
float base_angle = Geometry::deg2rad(float(m_object_config->support_material_angle));
- float interface_angle = Geometry::deg2rad(float(m_object_config->support_material_angle + 90));
+ float interface_angle = Geometry::deg2rad(float(m_object_config->support_material_angle + 90.));
coordf_t interface_spacing = m_object_config->support_material_interface_spacing.value + m_support_material_interface_flow.spacing();
coordf_t interface_density = std::min(1., m_support_material_interface_flow.spacing() / interface_spacing);
coordf_t support_spacing = m_object_config->support_material_spacing.value + m_support_material_flow.spacing();
@@ -2763,7 +2763,7 @@ void PrintObjectSupportMaterial::generate_toolpaths(
if (base_layer.layer->bottom_z < EPSILON) {
// Base flange (the 1st layer).
filler = filler_interface.get();
- filler->angle = Geometry::deg2rad(float(m_object_config->support_material_angle + 90));
+ filler->angle = Geometry::deg2rad(float(m_object_config->support_material_angle + 90.));
density = 0.5f;
flow = m_first_layer_flow;
// use the proper spacing for first layer as we don't need to align