500 Commits

Author SHA1 Message Date
Vojtech Bubnik
2b7cf2d877 GCodeGenerator / custom G-codes: Added new read/only options providing
the amount of total extruded material and per extruder extruded material
up to the point the value is evaluated:
"extruded_volume", "extruded_weight",
"extruded_volume_total", "extruded_weight_total"
2023-03-30 10:36:36 +02:00
Vojtech Bubnik
7a5639f322 Fixed crash if toolchange G-code modifies final position,
because the extruder was not set yet.
2023-03-29 17:53:23 +02:00
Vojtech Bubnik
ab1813bdc8 PlaceholderParser: fixed access to "position" variable
Follow-up to 59552a8aee893316a74b9a6e012d164ff7643b44
2023-03-29 15:32:43 +02:00
Vojtech Bubnik
59552a8aee PlaceholderParser & G-code export: Exchange of position & extrusion status between custom G-codes and slicer, extension of script syntax.
Newly each custom G-code block may exchange the following values with slicer:

Position and Z-hop:
position (read/write)- 3 element vector (X, Y, Z) of current G-code position. Z element contains the current Z hop.
zhop (read only)- initial zhop value

Extruders: vector variables, one element per extruder:
e_position (read/write) - absolute E position, only available with absolute extruder addressing
e_retracted (read/write) - current retraction state
e_restart_extra (read/write) - current planned extra deretraction when starting printing

For readibility, script's if / elsif / else / endif syntax was modified:

{if cond then
	block
elsif cond then
	block
else
	block
endif}

Semicolon is not required after else or endif.
2023-03-28 12:47:32 +02:00
Lukas Matena
c9b15736da Fixed compilation errors and warnings 2023-03-24 09:56:40 +01:00
Lukas Matena
0a52ef8da7 Fix format of M204 emitted from machine limits for various fws 2023-03-24 09:29:53 +01:00
Lukas Matena
847a34c644 Do not clamp travel acceleration when current firmware flavor does not allow separate setting of print and travel acceleration 2023-03-24 09:29:53 +01:00
Lukas Matena
09122fb0d0 Added a new config option to disable automatic temperature commands around start gcode (autoemit_temperature_commands) 2023-03-24 09:29:53 +01:00
Lukas Matena
da714c7210 Removed M107 inserted automatically at the start of the G-Code 2023-03-24 09:29:53 +01:00
Lukas Matena
3ff600bed0 Separated travel and print acceleration control 2023-03-24 09:29:53 +01:00
YuSanka
19f2a1d9e9 Unified usage of localization macros in slic3r/libslic3r 2023-03-23 22:55:38 +01:00
Vojtech Bubnik
c28585ab7f WIP PlaceholderParser: Support for local and global variables.
Implements #4048 #7196

Syntax:

(global|local) variable_name =
	(scalar_expression|vector_variable|array_expr|initializer_list)

array_expr := array(repeat, value)
initializer_list := (value, value, value, ...)

The type of the newly created variable is defined by the type
of the right hand side intitializer.

Newly declared variable must not override an existing variable.
Variable may be assigned with global|local expression, but its type
must not be changed.

Newly the assignment operator also accepts the same right hand expressions
as the global|local variable definition.
2023-03-22 17:46:57 +01:00
Vojtech Bubnik
de3de3fd11 Fix of discrepancy between G-code placeholder parser current layer index
and total number of layers.
Fixed for non-sequential print only for now.
Partial fix of #9866
2023-03-06 10:47:38 +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
Pavel Mikus
7edd813fc8 fix bugs in ExtrusionEstimator 2023-03-02 15:30:41 +01:00
Pavel Mikus
10d04529d6 Implemented dynamic fan control. Cooling buffer does not yet relfect that 2023-03-02 15:30:41 +01:00
Pavel Mikus
a496444b7e make fixed overlap levels for dynamic overhang speed 2023-03-02 15:30:41 +01:00
Pavel Mikus
beabf46e87 Set cooling markers correctly - finally fix of cooperation between dynamic speed and pressure equalizer
Fixes the following issues: 9769, 9485 and maybe others where presusre equalier is used
with dynamic speeds
2023-02-22 11:01:12 +01:00
Pavel Mikus
5e550709ff fix issue 9800 - Avoid Crossing Curled Overhangs Not Respecting Printer Bed Size
Fix Avoid curled overhang functionality actually not working correctly, especially on multiple objects/instances
2023-02-20 21:14:34 +01:00
Lukas Matena
088fb22182 Fixed 'is_extruder_used' placeholder 2023-02-15 15:56:17 +01:00
Lukas Matena
e2045a60ee Separate acceleration control for external perimeters and (top) solid infill 2023-02-15 15:03:37 +01:00
Lukas Matena
026ca7b3c9 Fixed wipe tower with no sparse layers (layers were missing) #9592 #9703 2023-02-14 14:02:58 +01:00
Vojtech Bubnik
56c4cfb202 Fix of supports for soluble / non-soluble after refactoring
of extrusions into islands.
Fixes #9647
2023-02-08 14:40:50 +01:00
PavelMikus
dc1579df04 Apply volumetric speed limits to reference external perimeter speed when using percentage based speeds.
Otherwise it was possible to get higher speeds the extruder limit.
2023-02-08 10:52:06 +01:00
PavelMikus
a167d43c1d Fix bug in GCode markers when dynamic overhang speed is enabled
Should fix the following issues: #9594, #9485, #9563, #9588, #9610
Also fixed a problem with zero speed when dynamic speed was percentage based and speeds were set to 0 (auto)
2023-02-07 17:06:42 +01:00
Vojtech Bubnik
43dc3bfc42 Fix of a crash with sequential print and raft. Fixes #9464 2023-02-03 15:50:15 +01:00
Lukas Matena
ab4655aa40 Fix ooze prevention behaviour on first layer 2023-01-27 12:04:55 +01:00
Lukas Matena
fd3ab55197 MMU: Fixed missing travel to the wipe tower in one more case 2023-01-27 12:04:55 +01:00
PavelMikus
d0c86403a5 Fix lslices ordering - keep topological ordering from clipper, and separate print ordering into vector of indices 2023-01-26 15:50:18 +01:00
Lukas Matena
ae15032e0f Wipe tower: fixed missing travels to wipe tower on layers with no toolchanges 2023-01-26 07:28:37 +01:00
Lukas Matena
a067da6d53 Ooze prevention:
- remove the infinite skirt
- added 'idle_temperature' in Filament Settings as an optional parameter
- the logic is changed: if idle_temp is present, it is used,
  otherwise it uses the old delta value from Print Settings
- TODO: the optional parameter is not well supported in UI
2023-01-26 07:28:37 +01:00
Lukas Matena
98fea2f6ee Wipe tower: use GCode::set_extruder, allow ooze prevention:
this removes duplicated code and fixes toolchange retraction
The ooze prevention part needs further work, now it does not
work as advertised (the tall skirt)
2023-01-26 07:28:37 +01:00
Lukas Matena
7fb1bc2c16 Placeholders 'layer_num', 'layer_z' and 'max_layer_z' were not accessible in fil. start gcode when the wipe tower was off 2023-01-26 07:28:37 +01:00
Lukas Matena
b3664179f6 Wipe tower: remove a move to the wipe tower when not needed 2023-01-26 07:28:36 +01:00
Lukas Matena
90bd46e30a Added 'is_extruder_used' placeholder accessible from Custom Start G-Code 2023-01-26 07:28:36 +01:00
Vojtech Bubnik
ca0c83d914 The new ExtrusionRole implementation newly supports both "Bridging"
and "External" attributes at the same time.
PerimeterGenerator was updated to make use of it and set "External"
attribute for overhang perimeters.
2023-01-16 14:39:57 +01:00
Vojtech Bubnik
d1f610d957 Extending the expressivity of ExtrusionRole
Moved is_xx() test functions to ExtrusionRole enum class,
changed the tests to use the new ExtrusionRole bitmask.
Follow-up to 5991850db1f2d09d1b7713f42300e2bfe4a42128
e50e96bb26eab4f9d56c98706c03166635cf4fff
c64dbacf88c617e3d676bdaa6c8c81317ccaee5d
2023-01-16 12:39:08 +01:00
Vojtech Bubnik
c64dbacf88 WIP Extending the expressivity of ExtrusionRole
Changed GCodeExtrusionRole to enum class.
Follow-up to 5991850db1f2d09d1b7713f42300e2bfe4a42128
e50e96bb26eab4f9d56c98706c03166635cf4fff
2023-01-16 11:14:34 +01:00
Vojtech Bubnik
5991850db1 WIP Extending the expressivity of ExtrusionRole
Co-authored-by: supermerill <merill@free.fr>
Based on the unfinished idea of @supermerill, defining ExtrusionRole
as a bit mask of ExtrusionRoleModifier.
Because the ExtrusionRole was used for both ExtrusionEntity and
G-code export / G-code viewer, the original ExtrusionRole had to be split
to ExtrusionRole and GCodeExtrusionRole to support bitmask attributes
for the former while keeing a low number of ordinary values for the latter.
2023-01-16 10:14:46 +01:00
Vojtech Bubnik
661463645b Background processing: The milestone state machine was extended
with canceled / invalidated states.
Print / PrintObject infrastructure was extended with a cleanup()
callback, which may check for the new State::Canceled / State::Invalid
states of a particular milestone and turn it to State::Fresh
while releasing data of that particular milestone which is no more valid.

Also fixed a bug in 31fbfa56de70bf8093cea5fe56c73b0e6fa017c3
where the PrintObject shared data invalidation condition was flipped.
2023-01-16 10:14:46 +01:00
Pavel Mikus
cfb702be99 rename avoid_curled_filament_during_travels to avoid_crossing_curled_overhangs
mark avoid_crossing_curled_overhangs as Experimental
rename overhang_steepness_levels to overhang_overlap_levels
2023-01-11 17:15:11 +01:00
PavelMikus
9bf7ce5e28 change parameter name, fix and improve intersection insertions 2022-12-14 14:49:20 +01:00
Pavel Mikus
f730fd21d4 refactoring overhang speed 2022-12-14 14:49:20 +01:00
PavelMikus
3714943b49 unified extrusion quality estimator 2022-12-14 14:49:20 +01:00
PavelMikus
dd7777f648 fix tests 2022-12-14 14:49:20 +01:00
PavelMikus
17304a6263 minor fixes 2022-12-14 14:49:20 +01:00
PavelMikus
11353a4a5c UI integration, new option for speed on overhangs 2022-12-14 14:49:20 +01:00
PavelMikus
9d87257aec lower the speed, improve params 2022-12-14 14:49:20 +01:00
PavelMikus
9d1ac71e55 added support for multiple objects 2022-12-14 14:49:20 +01:00