This commit is contained in:
meril 2019-01-08 17:40:16 +01:00
parent 3704ea1fb2
commit b91b476032
6 changed files with 10 additions and 9 deletions

View File

@ -18,7 +18,7 @@ void FillRectilinear::_fill_surface_single(
expolygon.rotate(- direction.first); expolygon.rotate(- direction.first);
this->_min_spacing = scale_(this->spacing); this->_min_spacing = scale_(this->spacing);
assert(params.density > 0.0001f && params.density <= 1.f); assert(params.density > 0.0001f);
this->_line_spacing = coord_t(coordf_t(this->_min_spacing) / params.density); this->_line_spacing = coord_t(coordf_t(this->_min_spacing) / params.density);
this->_diagonal_distance = this->_line_spacing * 2; this->_diagonal_distance = this->_line_spacing * 2;
this->_line_oscillation = this->_line_spacing - this->_min_spacing; // only for Line infill this->_line_oscillation = this->_line_spacing - this->_min_spacing; // only for Line infill

View File

@ -773,7 +773,7 @@ bool FillRectilinear2::fill_surface_by_lines(const Surface *surface, const FillP
std::pair<float, Point> rotate_vector = this->_infill_direction(surface); std::pair<float, Point> rotate_vector = this->_infill_direction(surface);
rotate_vector.first += angleBase; rotate_vector.first += angleBase;
assert(params.density > 0.0001f && params.density <= 1.f); assert(params.density > 0.0001f);
coord_t line_spacing = coord_t(scale_(this->spacing) / params.density); coord_t line_spacing = coord_t(scale_(this->spacing) / params.density);
// On the polygons of poly_with_offset, the infill lines will be connected. // On the polygons of poly_with_offset, the infill lines will be connected.

View File

@ -380,7 +380,7 @@ static bool prepare_infill_hatching_segments(
out.direction.rotate(out.angle + 0.5 * M_PI); out.direction.rotate(out.angle + 0.5 * M_PI);
out.segs.clear(); out.segs.clear();
assert(params.density > 0.0001f && params.density <= 1.f); assert(params.density > 0.0001f);
coord_t line_spacing = coord_t(scale_(fill_dir_params.spacing) / params.density); coord_t line_spacing = coord_t(scale_(fill_dir_params.spacing) / params.density);
// Bounding box around the source contour, aligned with out.angle. // Bounding box around the source contour, aligned with out.angle.
@ -1531,7 +1531,7 @@ static bool fill_hatching_segments_legacy(
bool FillRectilinear3::fill_surface_by_lines(const Surface *surface, const FillParams &params, std::vector<FillDirParams> &fill_dir_params, Polylines &polylines_out) bool FillRectilinear3::fill_surface_by_lines(const Surface *surface, const FillParams &params, std::vector<FillDirParams> &fill_dir_params, Polylines &polylines_out)
{ {
assert(params.density > 0.0001f && params.density <= 1.f); assert(params.density > 0.0001f);
const float INFILL_OVERLAP_OVER_SPACING = 0.45f; const float INFILL_OVERLAP_OVER_SPACING = 0.45f;
assert(INFILL_OVERLAP_OVER_SPACING > 0 && INFILL_OVERLAP_OVER_SPACING < 0.5f); assert(INFILL_OVERLAP_OVER_SPACING > 0 && INFILL_OVERLAP_OVER_SPACING < 0.5f);

View File

@ -279,7 +279,7 @@ std::string WipeTowerIntegration::rotate_wipe_tower_moves(const std::string& gco
std::string WipeTowerIntegration::prime(GCode &gcodegen) std::string WipeTowerIntegration::prime(GCode &gcodegen)
{ {
assert(m_layer_idx == 0); //assert(m_layer_idx == 0);
std::string gcode; std::string gcode;
if (&m_priming != nullptr && ! m_priming.extrusions.empty()) { if (&m_priming != nullptr && ! m_priming.extrusions.empty()) {
@ -931,6 +931,7 @@ void GCode::_do_export(Print &print, FILE *file)
m_wipe_tower.reset(new WipeTowerIntegration(print.config(), *print.wipe_tower_data().priming.get(), print.wipe_tower_data().tool_changes, *print.wipe_tower_data().final_purge.get())); m_wipe_tower.reset(new WipeTowerIntegration(print.config(), *print.wipe_tower_data().priming.get(), print.wipe_tower_data().tool_changes, *print.wipe_tower_data().final_purge.get()));
_write(file, m_writer.travel_to_z(first_layer_height + m_config.z_offset.value, "Move to the first layer height")); _write(file, m_writer.travel_to_z(first_layer_height + m_config.z_offset.value, "Move to the first layer height"));
if (print.config().single_extruder_multi_material_priming) { if (print.config().single_extruder_multi_material_priming) {
//m_wipe_tower->next_layer();
_write(file, m_wipe_tower->prime(*this)); _write(file, m_wipe_tower->prime(*this));
// Verify, whether the print overaps the priming extrusions. // Verify, whether the print overaps the priming extrusions.
BoundingBoxf bbox_print(get_print_extrusions_extents(print)); BoundingBoxf bbox_print(get_print_extrusions_extents(print));
@ -2665,7 +2666,7 @@ std::string GCode::retract(bool toolchange)
methods even if we performed wipe, since this will ensure the entire retraction methods even if we performed wipe, since this will ensure the entire retraction
length is honored in case wipe path was too short. */ length is honored in case wipe path was too short. */
gcode += toolchange ? m_writer.retract_for_toolchange() : m_writer.retract(); gcode += toolchange ? m_writer.retract_for_toolchange() : m_writer.retract();
if (toolchange || !this->m_config.retract_lift_not_last_layer.value || !(this->m_last_extrusion_role == ExtrusionRole::erTopSolidInfill)) if (toolchange || !this->m_config.retract_lift_not_last_layer.get_at(m_writer.extruder()->id()) || !(this->m_last_extrusion_role == ExtrusionRole::erTopSolidInfill))
if (m_writer.extruder()->retract_length() > 0 || m_config.use_firmware_retraction) if (m_writer.extruder()->retract_length() > 0 || m_config.use_firmware_retraction)
gcode += m_writer.lift(); gcode += m_writer.lift();

View File

@ -1823,12 +1823,12 @@ void PrintConfigDef::init_fff_params()
def->mode = comAdvanced; def->mode = comAdvanced;
def->default_value = new ConfigOptionFloats { 0. }; def->default_value = new ConfigOptionFloats { 0. };
def = this->add("retract_lift_not_last_layer", coBool); def = this->add("retract_lift_not_last_layer", coBools);
def->label = L("Not on top"); def->label = L("Not on top");
def->category = L("Support material"); def->category = L("Support material");
def->tooltip = L("Select this option to not use the z-lift on a top surface."); def->tooltip = L("Select this option to not use the z-lift on a top surface.");
def->mode = comAdvanced; def->mode = comAdvanced;
def->default_value = new ConfigOptionBool(false); def->default_value = new ConfigOptionBools { false };
def = this->add("retract_restart_extra", coFloats); def = this->add("retract_restart_extra", coFloats);
def->label = L("Extra length on restart"); def->label = L("Extra length on restart");

View File

@ -677,7 +677,7 @@ public:
ConfigOptionFloats retract_lift; ConfigOptionFloats retract_lift;
ConfigOptionFloats retract_lift_above; ConfigOptionFloats retract_lift_above;
ConfigOptionFloats retract_lift_below; ConfigOptionFloats retract_lift_below;
ConfigOptionBool retract_lift_not_last_layer; ConfigOptionBools retract_lift_not_last_layer;
ConfigOptionFloats retract_restart_extra; ConfigOptionFloats retract_restart_extra;
ConfigOptionFloats retract_restart_extra_toolchange; ConfigOptionFloats retract_restart_extra_toolchange;
ConfigOptionFloats retract_speed; ConfigOptionFloats retract_speed;