Skip to content

Commit

Permalink
fix presse adv cal for linux
Browse files Browse the repository at this point in the history
  • Loading branch information
supermerill committed Jun 26, 2024
2 parents a423f74 + 699566c commit e14235d
Show file tree
Hide file tree
Showing 57 changed files with 1,309 additions and 259 deletions.
Binary file added resources/calibration/filament_pressure/0.3mf
Binary file not shown.
Binary file added resources/calibration/filament_pressure/1.3mf
Binary file not shown.
Binary file added resources/calibration/filament_pressure/2.3mf
Binary file not shown.
Binary file added resources/calibration/filament_pressure/3.3mf
Binary file not shown.
Binary file added resources/calibration/filament_pressure/4.3mf
Binary file not shown.
Binary file added resources/calibration/filament_pressure/5.3mf
Binary file not shown.
Binary file added resources/calibration/filament_pressure/6.3mf
Binary file not shown.
Binary file added resources/calibration/filament_pressure/7.3mf
Binary file not shown.
Binary file added resources/calibration/filament_pressure/8.3mf
Binary file not shown.
Binary file added resources/calibration/filament_pressure/9.3mf
Binary file not shown.
Binary file not shown.
41 changes: 41 additions & 0 deletions resources/calibration/filament_pressure/filament_pressure.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Pressure Advance Calibration</title>
</head>
<body>

<table width="100%">
<tbody>
<tr>
<td style="text-align: center;">
<h1>Pressure/Linear Advance</h1>
</td>
</tr>
<tr>
<td style="text-align: right;"><strong>
<table><tr><td>Needs:</td>
<td style="text-align: left;">Bed Leveling and Layer Squish to be perfect</td></tr>
</table>
</strong>
</tr>
</tbody>
</table>

<p><strong>this test is still in development, beta should work "ok" for now though.<br> your current print settings will need to be saved before clicking "generate" since it uses the saved values to create the model</strong></p>
<p>note: this test will auto pull all your currently loaded config parameters and generate a model for you to print!<br> for to help with firmware speed/processing limitations it's reccomended to have most extrusion roles similar set to speeds.</p>

<h2>How to tune your printer for Pressure/Linear Advance</h2>
<p>todo add detaisl here</p>
<h2>Advice</h2>
<p>Before doing this test, it's preferable to tune everything else first!<br>i would reccomended setting XXXX to the same speeds, XXX to a slow speed, and everything else you can send it with.</p>
<p>note: having large variance with ER speeds can reduce print quality/dimensional accuracy this is effect is mainly caused by the inner perimeter getting pulled closer to the external perimeter as it cools down, since each perimeter would be at different temperatues.</p>
<p><strong>TODO add things about PA and setting first layer correctly<br>add notes about fan speed and disabling fan speed for this test, or do i have check box in GUI that would auto change relavent UI tab?</strong></p>
<ul>
<li>bullet points</li>
</ul>
<h2>Notes</h2>
<p> TODO: add cred for andrew ellis testing method</p>
</body>
</html>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions resources/localization/list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ src/slic3r/GUI/CalibrationCubeDialog.cpp
src/slic3r/GUI/CalibrationFlowDialog.cpp
src/slic3r/GUI/CalibrationOverBridgeDialog.cpp
src/slic3r/GUI/CalibrationRetractionDialog.cpp
src/slic3r/GUI/CalibrationPressureAdvDialog.cpp
src/slic3r/GUI/CalibrationTempDialog.cpp
src/slic3r/GUI/ConfigManipulation.cpp
src/slic3r/GUI/ConfigSnapshotDialog.cpp
Expand Down
3 changes: 2 additions & 1 deletion resources/ui_layout/default/print.ui
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,12 @@ group:sidetext_width$5:Infill angle
line:Modifiers
setting:label_width$6:width$5:label$increment:fill_angle_increment
setting:width$5:fill_angle_cross
setting:width$5:fill_angle_follow_model
vector_line:fill_angle_template
# setting:fill_angle_template
group:sidetext_width$5:Advanced
setting:solid_infill_every_layers
line:Solid infill is area below
line:Solid infill if area below
setting:label$From region:solid_infill_below_area
setting:label$From the whole layer:solid_infill_below_layer_area
end_line
Expand Down
51 changes: 40 additions & 11 deletions src/libslic3r/Fill/Fill.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ struct SurfaceFillParams : FillParams
RETURN_COMPARE_NON_EQUAL(can_angle_cross);
RETURN_COMPARE_NON_EQUAL(density);
RETURN_COMPARE_NON_EQUAL(monotonic);
RETURN_COMPARE_NON_EQUAL(max_sparse_infill_spacing);
RETURN_COMPARE_NON_EQUAL_TYPED(unsigned, connection);
RETURN_COMPARE_NON_EQUAL_TYPED(unsigned, dont_adjust);

Expand All @@ -70,16 +71,22 @@ struct SurfaceFillParams : FillParams
assert(this->config != nullptr);
assert(rhs.config != nullptr);
if (config != nullptr && rhs.config != nullptr) {
RETURN_COMPARE_NON_EQUAL(config->infill_acceleration);
RETURN_COMPARE_NON_EQUAL(config->infill_speed);
RETURN_COMPARE_NON_EQUAL(config->solid_infill_acceleration);
RETURN_COMPARE_NON_EQUAL(config->solid_infill_speed);
RETURN_COMPARE_NON_EQUAL(config->top_solid_infill_acceleration);
RETURN_COMPARE_NON_EQUAL(config->top_solid_infill_speed);
RETURN_COMPARE_NON_EQUAL(config->ironing_speed);
RETURN_COMPARE_NON_EQUAL(config->default_acceleration);
RETURN_COMPARE_NON_EQUAL(config->default_speed);
RETURN_COMPARE_NON_EQUAL(config->bridge_acceleration);
RETURN_COMPARE_NON_EQUAL(config->bridge_speed);
RETURN_COMPARE_NON_EQUAL(config->bridge_speed_internal);
RETURN_COMPARE_NON_EQUAL(config->internal_bridge_acceleration);
RETURN_COMPARE_NON_EQUAL(config->internal_bridge_speed);
RETURN_COMPARE_NON_EQUAL(config->gap_fill_acceleration);
RETURN_COMPARE_NON_EQUAL(config->gap_fill_speed);
RETURN_COMPARE_NON_EQUAL(config->print_extrusion_multiplier);
RETURN_COMPARE_NON_EQUAL(max_sparse_infill_spacing);
RETURN_COMPARE_NON_EQUAL(config->region_gcode.value);
}
if (config == nullptr || rhs.config == nullptr || max_sparse_infill_spacing == 0)
RETURN_COMPARE_NON_EQUAL(flow.width());
Expand All @@ -92,14 +99,23 @@ struct SurfaceFillParams : FillParams
if ((config != nullptr) != (rhs.config != nullptr))
return false;
if(config != nullptr && (
config->infill_speed != rhs.config->infill_speed
config->infill_acceleration != rhs.config->infill_acceleration
|| config->infill_speed != rhs.config->infill_speed
|| config->solid_infill_acceleration != rhs.config->solid_infill_acceleration
|| config->solid_infill_speed != rhs.config->solid_infill_speed
|| config->top_solid_infill_acceleration != rhs.config->top_solid_infill_acceleration
|| config->top_solid_infill_speed != rhs.config->top_solid_infill_speed
|| config->ironing_speed != rhs.config->ironing_speed
|| config->default_acceleration != rhs.config->default_acceleration
|| config->default_speed != rhs.config->default_speed
|| config->bridge_acceleration != rhs.config->bridge_acceleration
|| config->bridge_speed != rhs.config->bridge_speed
|| config->bridge_speed_internal != rhs.config->bridge_speed_internal
|| config->gap_fill_speed != rhs.config->gap_fill_speed))
|| config->internal_bridge_acceleration != rhs.config->internal_bridge_acceleration
|| config->internal_bridge_speed != rhs.config->internal_bridge_speed
|| config->gap_fill_acceleration != rhs.config->gap_fill_acceleration
|| config->gap_fill_speed != rhs.config->gap_fill_speed
|| config->print_extrusion_multiplier != rhs.config->print_extrusion_multiplier
|| config->region_gcode != rhs.config->region_gcode
))
return false;
// then check params
return this->extruder == rhs.extruder &&
Expand Down Expand Up @@ -542,6 +558,12 @@ void Layer::make_fills(FillAdaptive::Octree* adaptive_fill_octree, FillAdaptive:
f->can_angle_cross = surface_fill.params.can_angle_cross;
f->adapt_fill_octree = (surface_fill.params.pattern == ipSupportCubic) ? support_fill_octree : adaptive_fill_octree;

// add object angle if needed
double z_object_angle = this->m_object->trafo().rotation().eulerAngles(0,1,2).z();
if (this->object()->config().fill_angle_follow_model.value) {
f->angle += z_object_angle;
}

if (surface_fill.params.pattern == ipLightning)
dynamic_cast<FillLightning::Filler*>(f.get())->generator = lightning_generator;

Expand Down Expand Up @@ -779,6 +801,7 @@ void Layer::make_ironing()
double line_spacing;
// Height of the extrusion, to calculate the extrusion flow from.
double height;
double acceleration;
double speed;
double angle;
IroningType type;
Expand All @@ -800,6 +823,10 @@ void Layer::make_ironing()
return true;
if (this->height > rhs.height)
return false;
if (this->acceleration < rhs.acceleration)
return true;
if (this->acceleration > rhs.acceleration)
return false;
if (this->speed < rhs.speed)
return true;
if (this->speed > rhs.speed)
Expand All @@ -811,11 +838,12 @@ void Layer::make_ironing()
return false;
}

bool operator==(const IroningParams &rhs) const {
bool operator==(const IroningParams &rhs) const
{
return this->extruder == rhs.extruder && this->just_infill == rhs.just_infill &&
this->line_spacing == rhs.line_spacing && this->height == rhs.height && this->speed == rhs.speed &&
this->angle == rhs.angle &&
this->type == rhs.type;
this->line_spacing == rhs.line_spacing && this->height == rhs.height &&
this->acceleration == rhs.acceleration && this->speed == rhs.speed &&
this->angle == rhs.angle && this->type == rhs.type;
}

LayerRegion *layerm = nullptr;
Expand Down Expand Up @@ -862,6 +890,7 @@ void Layer::make_ironing()
ironing_params.just_infill = false;
ironing_params.line_spacing = config.ironing_spacing;
ironing_params.height = default_layer_height * 0.01 * config.ironing_flowrate;
ironing_params.acceleration = config.ironing_acceleration;
ironing_params.speed = config.ironing_speed;
if (config.ironing_angle.value >= 0) {
ironing_params.angle = float(Geometry::deg2rad(config.ironing_angle.value));
Expand Down
2 changes: 1 addition & 1 deletion src/libslic3r/Format/BBConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ void init()
//key_translation_map["bridge_angle"] = "bridge_angle";
key_translation_map["bridge_density"] = "bridge_overlap_min";
key_translation_map["bridge_no_support"] = "dont_support_bridges";
key_translation_map["internal_bridge_speed"] = "bridge_speed_internal";
//key_translation_map["internal_bridge_speed"] = "internal_bridge_speed";
//key_translation_map["brim_ears"] = "brim_ears";
//key_translation_map["brim_ears_detection_length"] = "brim_ears_detection_length";
//key_translation_map["brim_ears_max_angle"] = "brim_ears_max_angle";
Expand Down
Loading

0 comments on commit e14235d

Please sign in to comment.