mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-15 11:45:55 +08:00
minor issues fix
This commit is contained in:
parent
325709c5ae
commit
5839e78a5e
@ -537,7 +537,7 @@ void PrintConfigDef::init_fff_params()
|
|||||||
def->set_default_value(new ConfigOptionFloat(60));
|
def->set_default_value(new ConfigOptionFloat(60));
|
||||||
|
|
||||||
def = this->add("enable_dynamic_overhang_speeds", coBool);
|
def = this->add("enable_dynamic_overhang_speeds", coBool);
|
||||||
def->label = L("Enable dynamic overhang speeds (Experimental)");
|
def->label = L("Enable dynamic overhang speeds");
|
||||||
def->category = L("Speed");
|
def->category = L("Speed");
|
||||||
def->tooltip = L("This setting enables dynamic speed control on overhangs.");
|
def->tooltip = L("This setting enables dynamic speed control on overhangs.");
|
||||||
def->mode = comAdvanced;
|
def->mode = comAdvanced;
|
||||||
|
@ -260,8 +260,8 @@ std::vector<ExtrusionLine> check_extrusion_entity_stability(const ExtrusionEntit
|
|||||||
|
|
||||||
SupportPointCause potential_cause = std::abs(curr_point.curvature) > 0.1 ? SupportPointCause::FloatingBridgeAnchor :
|
SupportPointCause potential_cause = std::abs(curr_point.curvature) > 0.1 ? SupportPointCause::FloatingBridgeAnchor :
|
||||||
SupportPointCause::LongBridge;
|
SupportPointCause::LongBridge;
|
||||||
float line_len = i > 0 ? ((annotated_points[i - 1].position - curr_point.position).norm()) : 0.0f;
|
float line_len = i > 0 ? ((annotated_points[i - 1].position - curr_point.position).norm()) : 0.0f;
|
||||||
Vec2d line_dir = (curr_point.position - prev_point.position).normalized();
|
Vec2d line_dir = line_len > EPSILON ? Vec2d((curr_point.position - prev_point.position) / double(line_len)) : Vec2d::Zero();
|
||||||
|
|
||||||
ExtrusionLine line_out{i > 0 ? annotated_points[i - 1].position.cast<float>() : curr_point.position.cast<float>(),
|
ExtrusionLine line_out{i > 0 ? annotated_points[i - 1].position.cast<float>() : curr_point.position.cast<float>(),
|
||||||
curr_point.position.cast<float>(), line_len, entity};
|
curr_point.position.cast<float>(), line_len, entity};
|
||||||
@ -335,14 +335,6 @@ std::vector<ExtrusionLine> check_extrusion_entity_stability(const ExtrusionEntit
|
|||||||
line_out.form_quality = 0.8f;
|
line_out.form_quality = 0.8f;
|
||||||
bridged_distance += line_len;
|
bridged_distance += line_len;
|
||||||
if (bridged_distance > max_bridge_len) {
|
if (bridged_distance > max_bridge_len) {
|
||||||
std::cout << "Problem found A: " << std::endl;
|
|
||||||
std::cout << "bridged_distance: " << bridged_distance << std::endl;
|
|
||||||
std::cout << "max_bridge_len: " << max_bridge_len << std::endl;
|
|
||||||
std::cout << "line_out.form_quality: " << line_out.form_quality << std::endl;
|
|
||||||
std::cout << "curr_point.distance: " << curr_point.distance << std::endl;
|
|
||||||
std::cout << "curr_point.curvature: " << curr_point.curvature << std::endl;
|
|
||||||
std::cout << "flow_width: " << flow_width << std::endl;
|
|
||||||
|
|
||||||
line_out.support_point_generated = potential_cause;
|
line_out.support_point_generated = potential_cause;
|
||||||
bridged_distance = 0.0f;
|
bridged_distance = 0.0f;
|
||||||
}
|
}
|
||||||
@ -350,14 +342,6 @@ std::vector<ExtrusionLine> check_extrusion_entity_stability(const ExtrusionEntit
|
|||||||
bridged_distance += line_len;
|
bridged_distance += line_len;
|
||||||
line_out.form_quality = nearest_prev_layer_line.form_quality - 0.3f;
|
line_out.form_quality = nearest_prev_layer_line.form_quality - 0.3f;
|
||||||
if (line_out.form_quality < 0 && bridged_distance > max_bridge_len) {
|
if (line_out.form_quality < 0 && bridged_distance > max_bridge_len) {
|
||||||
std::cout << "Problem found B: " << std::endl;
|
|
||||||
std::cout << "bridged_distance: " << bridged_distance << std::endl;
|
|
||||||
std::cout << "max_bridge_len: " << max_bridge_len << std::endl;
|
|
||||||
std::cout << "line_out.form_quality: " << line_out.form_quality << std::endl;
|
|
||||||
std::cout << "curr_point.distance: " << curr_point.distance << std::endl;
|
|
||||||
std::cout << "curr_point.curvature: " << curr_point.curvature << std::endl;
|
|
||||||
std::cout << "flow_width: " << flow_width << std::endl;
|
|
||||||
|
|
||||||
line_out.support_point_generated = potential_cause;
|
line_out.support_point_generated = potential_cause;
|
||||||
line_out.form_quality = 0.5f;
|
line_out.form_quality = 0.5f;
|
||||||
bridged_distance = 0.0f;
|
bridged_distance = 0.0f;
|
||||||
@ -662,7 +646,8 @@ std::tuple<ObjectPart, float> build_object_part_from_slice(const size_t &slice_i
|
|||||||
}
|
}
|
||||||
|
|
||||||
// BRIM HANDLING
|
// BRIM HANDLING
|
||||||
if (layer->id() == params.raft_layers_count && params.raft_layers_count == 0 && params.brim_type != BrimType::btNoBrim) {
|
if (layer->id() == params.raft_layers_count && params.raft_layers_count == 0 && params.brim_type != BrimType::btNoBrim &&
|
||||||
|
params.brim_width > 0.0) {
|
||||||
// TODO: The algorithm here should take into account that multiple slices may have coliding Brim areas and the final brim area is
|
// TODO: The algorithm here should take into account that multiple slices may have coliding Brim areas and the final brim area is
|
||||||
// smaller,
|
// smaller,
|
||||||
// thus has lower adhesion. For now this effect will be neglected.
|
// thus has lower adhesion. For now this effect will be neglected.
|
||||||
@ -921,7 +906,8 @@ std::tuple<SupportPoints, PartialObjects> check_stability(const PrintObject *po,
|
|||||||
for (const auto &perimeter_idx : island.perimeters) {
|
for (const auto &perimeter_idx : island.perimeters) {
|
||||||
const ExtrusionEntity *entity = perimeter_region->perimeters().entities[perimeter_idx];
|
const ExtrusionEntity *entity = perimeter_region->perimeters().entities[perimeter_idx];
|
||||||
std::vector<ExtrusionLine> perims = check_extrusion_entity_stability(entity, perimeter_region,
|
std::vector<ExtrusionLine> perims = check_extrusion_entity_stability(entity, perimeter_region,
|
||||||
prev_layer_ext_perim_lines,prev_layer_boundary, params);
|
prev_layer_ext_perim_lines, prev_layer_boundary,
|
||||||
|
params);
|
||||||
for (const ExtrusionLine &perim : perims) {
|
for (const ExtrusionLine &perim : perims) {
|
||||||
if (perim.support_point_generated.has_value()) {
|
if (perim.support_point_generated.has_value()) {
|
||||||
reckon_new_support_point(*perim.support_point_generated, create_support_point_position(perim.b), -EPSILON,
|
reckon_new_support_point(*perim.support_point_generated, create_support_point_position(perim.b), -EPSILON,
|
||||||
@ -932,6 +918,30 @@ std::tuple<SupportPoints, PartialObjects> check_stability(const PrintObject *po,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// DEBUG EXPORT, NOT USED NOW
|
||||||
|
// if (BR_bridge) {
|
||||||
|
// Lines scaledl;
|
||||||
|
// for (const auto &l : prev_layer_boundary.get_lines()) {
|
||||||
|
// scaledl.emplace_back(Point::new_scale(l.a), Point::new_scale(l.b));
|
||||||
|
// }
|
||||||
|
|
||||||
|
// Lines perimsl;
|
||||||
|
// for (const auto &l : current_slice_ext_perims_lines) {
|
||||||
|
// perimsl.emplace_back(Point::new_scale(l.a), Point::new_scale(l.b));
|
||||||
|
// }
|
||||||
|
|
||||||
|
// BoundingBox bb = get_extents(scaledl);
|
||||||
|
// bb.merge(get_extents(perimsl));
|
||||||
|
|
||||||
|
// ::Slic3r::SVG svg(debug_out_path(
|
||||||
|
// ("slice" + std::to_string(slice_idx) + "_" + std::to_string(layer_idx).c_str()).c_str()),
|
||||||
|
// get_extents(scaledl));
|
||||||
|
// svg.draw(scaledl, "red", scale_(0.4));
|
||||||
|
// svg.draw(perimsl, "blue", scale_(0.25));
|
||||||
|
|
||||||
|
|
||||||
|
// svg.Close();
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
LD current_slice_lines_distancer(current_slice_ext_perims_lines);
|
LD current_slice_lines_distancer(current_slice_ext_perims_lines);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user