diff --git a/src/libslic3r/SupportSpotsGenerator.cpp b/src/libslic3r/SupportSpotsGenerator.cpp index 6072b613d4..d6dff123b2 100644 --- a/src/libslic3r/SupportSpotsGenerator.cpp +++ b/src/libslic3r/SupportSpotsGenerator.cpp @@ -119,7 +119,6 @@ public: class StabilityAccumulator { private: - Polygon base_convex_hull { }; Points support_points { }; Vec3f centroid_accumulator = Vec3f::Zero(); float accumulated_volume { }; @@ -384,7 +383,7 @@ void check_extrusion_entity_stability(const ExtrusionEntity *entity, if (distance_from_last_support_point > params.min_distance_between_support_points && bridging_acc.distance // if unsupported distance is larger than bridge distance linearly decreased by curvature, enforce supports. > params.bridge_distance - / (bridging_acc.max_curvature + / (1.0f + bridging_acc.max_curvature * params.bridge_distance_decrease_by_curvature_factor / PI)) { current_segment.add_support_point(current, 0.0f); // Do not count extrusion supports into the sticking force. They can be very densely placed, causing algorithm to overestimate stickiness. issues.supports_nedded.emplace_back(to_vec3f(current), 1.0); diff --git a/src/libslic3r/SupportSpotsGenerator.hpp b/src/libslic3r/SupportSpotsGenerator.hpp index 603076b291..0390b32afd 100644 --- a/src/libslic3r/SupportSpotsGenerator.hpp +++ b/src/libslic3r/SupportSpotsGenerator.hpp @@ -11,7 +11,7 @@ struct Params { 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; //mm - float bridge_distance_decrease_by_curvature_factor = 5.0f; // >0 REQUIRED; allowed bridge distance = bridge_distance / (this factor * (curvature / PI) ) + float bridge_distance_decrease_by_curvature_factor = 5.0f; // allowed bridge distance = bridge_distance / (this factor * (curvature / PI) ) float min_distance_between_support_points = 0.5f; @@ -21,7 +21,7 @@ struct Params { float support_points_interface_radius = 0.5f; // mm - float max_acceleration = 1000.0f; // mm/s^2 ; max acceleration of object (bed) in XY + float max_acceleration = 9*1000.0f; // mm/s^2 ; max acceleration of object (bed) in XY (NOTE: The max hit is received by the object in the jerk phase, so the usual machine limits are too low) 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 X grams diff --git a/src/libslic3r/TriangleSelectorWrapper.cpp b/src/libslic3r/TriangleSelectorWrapper.cpp index ec716ebca3..c6040c721c 100644 --- a/src/libslic3r/TriangleSelectorWrapper.cpp +++ b/src/libslic3r/TriangleSelectorWrapper.cpp @@ -29,6 +29,14 @@ void TriangleSelectorWrapper::enforce_spot(const Vec3f &point, const Vec3f &orig break; } } + } else { + size_t hit_idx_out; + Vec3f hit_point_out; + AABBTreeIndirect::squared_distance_to_indexed_triangle_set(mesh.its.vertices, mesh.its.indices, triangles_tree, point, hit_idx_out, hit_point_out); + std::unique_ptr cursor = std::make_unique( + point, origin, radius, Transform3d::Identity(), TriangleSelector::ClippingPlane { }); + selector.select_patch(hit_idx_out, std::move(cursor), EnforcerBlockerType::ENFORCER, Transform3d::Identity(), + true, 0.0f); } }