debug info, problem with random freezing, also support point downward projection still has issues

This commit is contained in:
Godrak 2022-05-02 16:47:19 +02:00 committed by PavelMikus
parent 91a4047586
commit 9b290bd211
2 changed files with 17 additions and 5 deletions

View file

@ -304,15 +304,20 @@ struct BalanceDistributionGrid {
std::unordered_set<int> modified_acc_ids;
modified_acc_ids.reserve(issues.supports_nedded.size() + 1);
for (int z = 1; z < local_z_cell_count; ++z) {
std::cout << "current z: " << z << std::endl;
modified_acc_ids.clear();
for (int x = 0; x < global_cell_count.x(); ++x) {
for (int y = 0; y < global_cell_count.y(); ++y) {
Cell &current = this->access_cell(Vec3i(x, y, z));
// distribute curling
std::cout << "distribute curling " << std::endl;
if (current.volume > 0) {
for (int y_offset = -1; y_offset <= 1; ++y_offset) {
for (int x_offset = -1; x_offset <= 1; ++x_offset) {
if (validate_xy_coords(Vec2i(x_offset, y_offset))) {
if (validate_xy_coords(Vec2i(x+x_offset,y+ y_offset))) {
Cell &under = this->access_cell(Vec3i(x + x_offset, y + y_offset, z - 1));
current.curled_height += under.curled_height
/ (2 + std::abs(x_offset) + std::abs(y_offset));
@ -321,6 +326,8 @@ struct BalanceDistributionGrid {
}
}
// distribute islands info
std::cout << "distribute islands info " << std::endl;
if (current.volume > 0 && current.island_id == std::numeric_limits<int>::max()) {
int min_island_id_found = std::numeric_limits<int>::max();
std::unordered_set<int> ids_to_merge { };
@ -335,6 +342,8 @@ struct BalanceDistributionGrid {
}
}
}
// assign island and update its info
std::cout << "assign island and update its info " << std::endl;
if (min_island_id_found < std::numeric_limits<int>::max()) {
ids_to_merge.erase(std::numeric_limits<int>::max());
ids_to_merge.erase(min_island_id_found);
@ -354,6 +363,8 @@ struct BalanceDistributionGrid {
}
}
std::cout << " check all active accumulators " << std::endl;
for (int acc_id : modified_acc_ids) {
std::cout << "Z: " << z << " controlling acc id: " << acc_id << std::endl;

View file

@ -8,9 +8,9 @@ namespace Slic3r {
namespace SupportableIssues {
struct Params {
const float gravity_constant = 9806.65f; // mm/s^2 ; gravity acceleration on Earth's surface, and assuming printer is in upwards position.
const float gravity_constant = 9806.65f; // mm/s^2; gravity acceleration on Earth's surface, algorithm assumes that printer is in upwards position.
float bridge_distance = 10.0f;
float bridge_distance = 10.0f; //mm
float limit_curvature = 0.15f; // used to detect curling issues
float max_first_ex_perim_unsupported_distance_factor = 0.0f; // if external perim first, return tighter max allowed distance from previous layer extrusion
@ -20,10 +20,11 @@ struct Params {
float base_adhesion = 2000.0f; // adhesion per mm^2 of first layer; Force needed to remove the object from the bed, divided by the adhesion area (g/mm*s^2)
float support_adhesion = 1000.0f; // adhesion per mm^2 of support interface layer
float support_points_interface_area = 5.0f; // mm^2
float max_acceleration = 1000.0f; // mm/s^2 ; max acceleration in XY
float filament_density = 1.25f * 0.001f; // g/mm^3
float max_acceleration = 1000.0f; // mm/s^2 ; max acceleration of object (bed) in XY
float filament_density = 1.25f * 0.001f; // g/mm^3 ; Common filaments are very lightweight, so precise number is not that important
float tolerable_extruder_conflict_force = 50.0f * gravity_constant; // force that can occasionally push the model due to various factors (filament leaks, small curling, ... ); current value corresponds to weight of 200g
};
struct SupportPoint {