Refactoring FDM support spots generator to use Z-Graph (#11)

* import updates from curling avoidance branch

* fix compilation issues

* Refactoring FDM support spots generator to use the new Z-graph built during slicing

* fix local issues bugs

* fix bugs, add new filter for too short extrusions

* fix bugs with nonexistent weakest area

* Use links of Z graph after fix, format the code

* remove unnecesary includes
This commit is contained in:
Pavel Mikuš 2022-11-28 10:47:04 +01:00 committed by GitHub
parent 25da414f5c
commit 3fa1615518
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 520 additions and 828 deletions

View File

@ -425,7 +425,7 @@ void PrintObject::generate_support_spots()
[](const ModelVolume* mv){return mv->supported_facets.empty();}) [](const ModelVolume* mv){return mv->supported_facets.empty();})
) { ) {
SupportSpotsGenerator::Params params{this->print()->m_config.filament_type.values}; SupportSpotsGenerator::Params params{this->print()->m_config.filament_type.values};
auto [issues, malformations] = SupportSpotsGenerator::full_search(this, params); SupportSpotsGenerator::Issues issues = SupportSpotsGenerator::full_search(this, params);
auto obj_transform = this->trafo_centered(); auto obj_transform = this->trafo_centered();
for (ModelVolume *model_volume : this->model_object()->volumes) { for (ModelVolume *model_volume : this->model_object()->volumes) {

File diff suppressed because it is too large Load Diff

View File

@ -32,8 +32,7 @@ struct Params {
const float min_distance_between_support_points = 3.0f; //mm const float min_distance_between_support_points = 3.0f; //mm
const float support_points_interface_radius = 1.5f; // mm const float support_points_interface_radius = 1.5f; // mm
const float connections_min_considerable_area = 1.5f; //mm^2 const float connections_min_considerable_area = 1.5f; //mm^2
const float small_parts_threshold = 5.0f; //mm^3 const float min_distance_to_allow_local_supports = 2.0f; //mm
const float small_parts_support_points_interface_radius = 3.0f; // mm
std::string filament_type; std::string filament_type;
const float gravity_constant = 9806.65f; // mm/s^2; gravity acceleration on Earth's surface, algorithm assumes that 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.
@ -61,11 +60,11 @@ struct Params {
}; };
struct SupportPoint { struct SupportPoint {
SupportPoint(const Vec3f &position, float force, float spot_radius, const Vec3f &direction); SupportPoint(const Vec3f &position, float force, float spot_radius, const Vec2f &direction);
Vec3f position; Vec3f position;
float force; float force;
float spot_radius; float spot_radius;
Vec3f direction; Vec2f direction;
}; };
struct Issues { struct Issues {
@ -77,7 +76,7 @@ struct Malformations {
}; };
// std::vector<size_t> quick_search(const PrintObject *po, const Params &params); // std::vector<size_t> quick_search(const PrintObject *po, const Params &params);
std::tuple<Issues, Malformations> full_search(const PrintObject *po, const Params &params); Issues full_search(const PrintObject *po, const Params &params);
void estimate_supports_malformations(SupportLayerPtrs &layers, float supports_flow_width, const Params &params); void estimate_supports_malformations(SupportLayerPtrs &layers, float supports_flow_width, const Params &params);
void estimate_malformations(LayerPtrs &layers, const Params &params); void estimate_malformations(LayerPtrs &layers, const Params &params);