mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-01 02:21:58 +08:00
Finally some working curling model
This commit is contained in:
parent
4ade7d6e8c
commit
6ee674316d
@ -218,7 +218,7 @@ float estimate_curled_up_height(
|
|||||||
point.distance < params.malformation_distance_factors.second * flow_width) {
|
point.distance < params.malformation_distance_factors.second * flow_width) {
|
||||||
// imagine the extrusion profile. The part that has been glued (melted) with the previous layer will be called anchored section
|
// imagine the extrusion profile. The part that has been glued (melted) with the previous layer will be called anchored section
|
||||||
// and the rest will be called curling section
|
// and the rest will be called curling section
|
||||||
float anchored_section = flow_width - point.distance;
|
// float anchored_section = flow_width - point.distance;
|
||||||
float curling_section = point.distance;
|
float curling_section = point.distance;
|
||||||
|
|
||||||
// after extruding, the curling (floating) part of the extrusion starts to shrink back to the rounded shape of the nozzle
|
// after extruding, the curling (floating) part of the extrusion starts to shrink back to the rounded shape of the nozzle
|
||||||
@ -234,14 +234,8 @@ float estimate_curled_up_height(
|
|||||||
|
|
||||||
if (point.curvature > 0.01){
|
if (point.curvature > 0.01){
|
||||||
float radius = std::max(1.0 / point.curvature - flow_width / 2.0, 0.001);
|
float radius = std::max(1.0 / point.curvature - flow_width / 2.0, 0.001);
|
||||||
// compute radius at the point where the extrusion stops touching the previous layer and starts curling
|
float curling_t = radius / 100;
|
||||||
float radius_anchored_section_end = radius + anchored_section;
|
float b = curling_t * flow_width;
|
||||||
// target radius represents the radius of the extrusion curling end, after curling
|
|
||||||
// the layer_height term aproximates that the extrusion curling part, when raising to vertical position, will stop before reaching
|
|
||||||
// perpendicular position, due to various forces.
|
|
||||||
float target_radius = radius_anchored_section_end + radius * flow_width / 100.0;
|
|
||||||
|
|
||||||
float b = target_radius - radius_anchored_section_end;
|
|
||||||
float a = curling_section;
|
float a = curling_section;
|
||||||
float c = sqrt(std::max(0.0f,a*a - b*b));
|
float c = sqrt(std::max(0.0f,a*a - b*b));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user