diff --git a/src/libslic3r/SupportSpotsGenerator.cpp b/src/libslic3r/SupportSpotsGenerator.cpp index b7067fd9c..28ea8d17c 100644 --- a/src/libslic3r/SupportSpotsGenerator.cpp +++ b/src/libslic3r/SupportSpotsGenerator.cpp @@ -674,7 +674,7 @@ public: Vec3d endpoint = (to_3d(extruded_line.b, layer_z)).cast(); float conflict_torque_arm = line_alg::distance_to( Linef3(endpoint, endpoint + extruder_pressure_direction.cast()), pivot.cast()); - float extruder_conflict_force = params.tolerable_extruder_conflict_force + + float extruder_conflict_force = params.standard_extruder_conflict_force + std::min(extruded_line.malformation, 1.0f) * params.malformations_additive_conflict_extruder_force; float extruder_conflict_torque = extruder_conflict_force * conflict_torque_arm; @@ -721,6 +721,7 @@ public: Vec3f centroid = connection.centroid_accumulator / connection.area; Vec2f variance = (connection.second_moment_of_area_accumulator / connection.area - centroid.head<2>().cwiseProduct(centroid.head<2>())); + variance = variance.cwiseProduct(line_dir.cwiseAbs()); float extreme_fiber_dist = variance.cwiseSqrt().norm(); float elastic_section_modulus = connection.area * (variance.x() + variance.y()) / extreme_fiber_dist; float yield_torque = elastic_section_modulus * params.yield_strength; @@ -733,17 +734,17 @@ public: float weight_arm = (centroid.head<2>() - mass_centroid.head<2>()).norm(); float weight_torque = weight_arm * weight; - float bed_movement_arm = mass_centroid.z(); + float bed_movement_arm = std::max(0.0f, mass_centroid.z() - centroid.z()); float bed_movement_force = params.max_acceleration * mass; float bed_movement_torque = bed_movement_force * bed_movement_arm; Vec3f extruder_pressure_direction = to_3d(line_dir, 0.0f); - extruder_pressure_direction.z() = -0.1f - extruded_line.malformation * 0.5f; + extruder_pressure_direction.z() = -extruded_line.malformation * 0.5f; extruder_pressure_direction.normalize(); Vec3d endpoint = (to_3d(extruded_line.b, layer_z)).cast(); float conflict_torque_arm = line_alg::distance_to( Linef3(endpoint, endpoint + extruder_pressure_direction.cast()), centroid.cast()); - float extruder_conflict_force = params.tolerable_extruder_conflict_force + + float extruder_conflict_force = params.standard_extruder_conflict_force + std::min(extruded_line.malformation, 1.0f) * params.malformations_additive_conflict_extruder_force; float extruder_conflict_torque = extruder_conflict_force * conflict_torque_arm; diff --git a/src/libslic3r/SupportSpotsGenerator.hpp b/src/libslic3r/SupportSpotsGenerator.hpp index 15b580289..081366369 100644 --- a/src/libslic3r/SupportSpotsGenerator.hpp +++ b/src/libslic3r/SupportSpotsGenerator.hpp @@ -24,7 +24,7 @@ struct Params { const 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) const float filament_density = 1.25f * 0.001f; // g/mm^3 ; Common filaments are very lightweight, so precise number is not that important const float yield_strength = 33000.0f; // mN/mm^2; 33 MPa is yield strength of ABS, which has the lowest yield strength from common materials. - const 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 + const float standard_extruder_conflict_force = 1.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 const float malformations_additive_conflict_extruder_force = 100.0f * gravity_constant; // for areas with possible high layered curled filaments };