42 Commits

Author SHA1 Message Date
Lukáš Hejl
016103dd95 SPE-2455: Fix extrusions with the zero feedrate after passing through CoolingBuffer. 2024-09-03 12:37:09 +02:00
Martin Šach
0bf8a9b1c5 Fix includes 2024-08-14 00:04:11 +02:00
Lukáš Hejl
7f666265e1 SPE-2368: Reduce the number of emitted M106 when dynamic fan speed on overhangs is enabled.
This fixed duplicity M106, which doesn't have any effect.
Also, it was implemented hysteresis that filters out small back-and-forth changes in fan speeds.
2024-08-09 09:56:42 +02:00
Martin Šach
919740fb3e Apply fix includes. 2024-07-08 15:37:02 +02:00
Martin Šach
21116995d7 Refactor CMake and improve #includes.
* 1. Remove all global include_directories.
* 2. Move 3d party dependencies from src to budled deps if possible.
* Unify and enforce one way of including headers:
    e.g. #include "libslic3r/GCode.hpp" vs #include "GCode.hpp"
    (always use the "libslic3r/GCode.hpp" option).
* Make all dependencies (also header only) a cmake target.
2024-07-08 15:36:46 +02:00
Justin Schuh
0b68210849 Fix of #11648: Prevent overhang fan speeds from spilling into infill. 2023-11-14 11:15:15 +01:00
Vojtech Bubnik
8dad25efc4 Merge branch 'master' into master_262 2023-09-04 14:44:32 +02:00
ps_copyright
f32859c302 final copyright headers 2023-09-01 14:49:07 +02:00
Vojtech Bubnik
319e31e201 Merge remote-tracking branch 'remotes/origin/master' into vb_arc_welder 2023-07-17 17:17:19 +02:00
Vojtech Bubnik
b4b9f2fb2b ArcWelder: Fixed some compiler warnings 2023-07-17 17:17:04 +02:00
Vojtech Bubnik
f9f49d2bb0 ArcWelder: Fixed some cooling buffer errors 2023-07-17 17:09:02 +02:00
Vojtech Bubnik
7eca48b755 ArcWelder: Extended cooling buffer with G2/G3 IJ/R 2023-07-17 16:56:08 +02:00
Vojtech Bubnik
19062b4d5f ArcWelder path interpolation based on the work by Brad Hochgesang @FormerLurker.
WIP GCode/SmoothPath.cpp,hpp cache for interpolating extrusion path with arches.
Removed Perl test t/geometry.t, replaced with C++ tests.
Refactored ExtrusionEntity and derived classes to hold extrusion attributes in new ExtrusionFlow/ExtrusionAttributes classes.
Reworked path ordering in G-code export to never copy polylines, but to work with a new "flipped" attribute.
Reworked G-code export to interpolate extrusion paths with smooth paths and to extrude those smooth paths.
New parameters: arc_fitting, arc_fitting_tolerance
Renamed GCode class to GCodeGenerator
Moved GCodeWriter.cpp/hpp to GCode/
Moved Wipe from from GCode.cpp,hpp to GCode/Wipe.cpp,hpp
Moved WipeTowerIntegration from GCode.cpp,hpp to GCode/WipeTowerIntegration.cpp,hpp
New variant of douglas_peucker() to simplify range of iterators in place.
Refactored wipe in general and wipe on perimeters / hiding seams.

WIP: Convert estimate_speed_from_extrusion_quality() and its application to smooth paths.
WIP: Cooling buffer to process G2G3, disable arc fitting for filters that cannot process it.
2023-07-13 11:54:42 +02:00
Lukas Matena
d907a004cf Fixed a bug in cooling buffer resulting in G-codes setting fan to more than 100 % 2023-06-30 11:10:54 +02:00
PavelMikus
96cdcf72d3 Fix disable fan for first x layers not working correctly.
Co-authored-by: Justin Schuh (@justinschuh)
2023-03-16 09:43:19 +01:00
PavelMikus
8f10943b69 fix assert fail in cooling buffer, clamp fan speed low limit must be same or smaller than high limit 2023-03-03 14:03:23 +01:00
PavelMikus
92f8ed6d6b Merge remote-tracking branch 'origin/master' into pm_anchor_bridges_on_sparse_infill 2023-03-02 16:57:10 +01:00
PavelMikus
c0165ec209 Fix dynamic fan speed colliding with detect bridging perimeters
Allow max fan speed override cooling max fan speed
2023-03-02 15:30:41 +01:00
Pavel Mikus
edec566d2c fix and integrate with CoolingBuffer 2023-03-02 15:30:41 +01:00
Vojtech Bubnik
978f5c8b47 Merge remote-tracking branch 'remotes/origin/master' into vb_ensurovani 2023-02-17 15:20:47 +01:00
Lukas Matena
0e1f8bd080 Fixed an UB in CoolingBuffer.cpp: uninitialized var in case that std::from_chars fails:
This fixes CoolingBuffer behavior wrt. 2.5.0 in cases where custom G-Codes contained
lines starting with "T". Those were previously considered as valid toolchanges.
In 2.6.0-alpha3, this scenario led to a hard crash: #9470, #9550
2023-02-06 15:54:33 +01:00
Vojtech Bubnik
479a39ce0e Fixed some compiler warnings 2023-01-04 16:41:42 +01:00
Vojtech Bubnik
af6b022878 Optimization of Cooling buffer by replacing atof() and atoi()
with std::from_chars() and fast_float::from_chars()
2022-11-22 09:28:08 +01:00
Vojtech Bubnik
0c99a14b63 Follow-up to f1d52cb41209e1e7cca525242ccab024a62aa00c
Fixes of cooling buffer logic:
    Fixed division by zero on zero length extrusions.
2022-06-24 16:46:49 +02:00
Vojtech Bubnik
f1d52cb412 Fixes of cooling buffer logic:
Fixed division by zero on zero length extrusions.
Added bunch of asserts to check for divisions by zero.
2022-06-24 15:08:35 +02:00
Vojtech Bubnik
07d0484e32 Fix of Empty G1 before starting bridging perimeter #7714 2022-01-10 15:24:19 +01:00
Vojtech Bubnik
4e9f906848 Cooling buffer used to remove F word from G1 Fxxx lines if the feed rate
did not change compared to the preceding value creating empty "G1" lines.
The empty "G1" lines are now removed.
Improves Features fail with extra G1 moves when above a certain layer height and Detect Thin Walls is enabled #5176
Improves Thin wall detection causes miniature loops to be added, and emits empty G1 commands #3058
2021-11-02 12:11:53 +01:00
Vojtech Bubnik
32ebfa66e9 Fix of M106 on every new layer #7094
after parallelization of CoolingBuffer:
Remember the last fan speed emitted at the previous layer.
2021-10-18 14:56:02 +02:00
Vojtech Bubnik
03b6048684 Follow-up to beee18f22991e369b1722a43bbcb692fa0d68af0
WIP to G-code export parallelization through pipelining:
Decoupled CoolingBuffer from GCode / GCodeWriter, ready to be
pipelined on a different thread.
2021-09-10 11:43:59 +02:00
Vojtech Bubnik
980ca195f5 Merge remote-tracking branch 'remotes/origin/lh_multi_material_segmentation' into vb_print_regions 2021-05-26 15:23:35 +02:00
Lukas Matena
4a7f078527 Fixed debug build 2021-05-24 12:20:29 +02:00
Vojtech Bubnik
d1cfdcb49e Refactoring of StaticPrintConfig & derived classes:
1) Using boost::preprocessor to reduce code duplicities when defining
   new configuration values.
2) Implemented static hash() and operator== on StaticPrintConfig derived
   classes to support hash tables of instances thereof.
2021-04-26 18:37:10 +02:00
Vojtech Bubnik
38bb7d2950 1) New methods PrintObject::num_regions() and ::has_region() to make
the code more readable and to highlight where PrintObject::region_volumes
   are actually set and consumed.
2) Replaced Slic3r::clamp() with std::clamp(). They differ in the order
   of their parameters, thus hopefully no new bugs were introduced.
3) Some refactoring of MultiMaterialSegmentation for efficiency.
2021-04-22 11:41:26 +02:00
Vojtech Bubnik
6ea5781709 Fix of Supports printed too slowly. #984
Processing of CoolingBuffer is newly staggered for support layers
until the 1st object layer above supports is received by CoolingBuffer.
2021-02-16 11:30:57 +01:00
Vojtech Bubnik
de32992b49 Fix of Fan ramp not correct for layer 1 #5893 2021-02-08 12:43:27 +01:00
Vojtech Bubnik
e1fc0b17a2 Ramp up layer cooling fan over X layers #848
Fan speed will be ramped up linearly from zero at layer disable_fan_first_layers
to maximum at layer full_fan_speed_layer. full_fan_speed_layer will be
ignored if lower than disable_fan_first_layers, in which case
the fan will be running at maximum allowed speed at layer
disable_fan_first_layers + 1.;

WIP: The cooling PresetHints are likely not finalized yet.
2020-12-04 11:53:02 +01:00
bubnikv
98e49772ed Custom G-code references are now being assigned to ToolOrdering::LayerTools()
and the superfluous M600 (color change) events are filtered out there.

Fixed a handful of compiler warnings.
2020-01-14 11:54:09 +01:00
Lukas Matena
a62bba2508 CoolingBuffer.cpp: Fixed a crash when encountering an invalid toolchange
This can happen if the user enters invalid toolchange through the custom gcodes
Such toolchange is now simply ignored by the CoolingBuffer, exporting gcode is NOT stopped, a log error is emitted
2019-09-10 11:46:18 +02:00
Lukas Matena
cb916c4dda Fixed warnings in libslic3r 2019-06-25 16:04:29 +02:00
bubnikv
a56f7d60e5 Fixed an issue, where the output G-code file name was not always updated
from the current Model/ModelObjects.
Fixed a possible race condition in updating Print::m_placeholder_parser
with the proposed filename / filename base.
Improved documentation (source code comments).
2019-02-03 10:41:14 +01:00
bubnikv
e59a10e0c2 Fix of a cooling slow down logic.
fixes "Min print speed" to "Estimated Print Time" Inconsistencies #1488
2019-02-01 17:15:41 +01:00
bubnikv
0558b53493 WIP: Moved sources int src/, separated most of the source code from Perl.
The XS was left only for the unit / integration tests, and it links
libslic3r only. No wxWidgets are allowed to be used from Perl starting
from now.
2018-09-19 11:02:24 +02:00