process G90 lines
process G91 lines
process G92 lines
process M82 lines
process M83 lines
process T lines
process extrusion role/width/height comment tags
debug output
Reverted the time estimate number stored into the G-code from
days/hours/minutes to days/hours/minutes/seconds, because who knows
who is already parsing the file.
which is a regression of an optimization 3e0690b37b
With the optimization disabled, the G-code generator will not be slower
than PrusaSlicer 2.1.1. I am leaving the code there to mark for
further optimization opportunities.
collisions against already printed objects: Rotation of an object
was not being taken into account.
Fixes#2450 PrusaSlicer 2.0 Sequential printing vs rotate object
Fixes#3585 Always Sequential Printing Error (Regardless of setting, placement or object size)
Fixed some collisions in sequential print just after arrangement by
making the validation using a slightly lower extruder radius value
than the arrangement.
Refactored PrintObject coordinate system so that the PrintObject's
coordinate system is always centered in respect to its ModelObject's
geometries. This refactoring may improve path planning a bit and
it may lower the requirements on bits representing Clipper coordinates
by 1 bit.
printer configuration:
ss -> sm : Just apply the color changes of the original ss project at the active extruder.
ss -> mm : There are no tool changes stored. Ignore color changes, they are invalid because they are extruder non-specific.
sm -> ss : Apply tool changes as color changes (tool changes remember the target color), apply original color changes.
sm -> mm : Ignore both color changes and tool changes.
mm -> ss/sm : Ignore both color changes and tool changes.
where the PrintObject bounding box was not invalidated correctly
when the transformation matrices of instances changed.
Also refactored PrintObject::size() for const correctness.
so that the ordering code at G-code export may work directly with
pointers to PrintInstances instead of with pair of <PrintObject, copy idx>.
Also the PrintInstance knows its source ModelInstance, which allows
sorting of PrintInstances for sequential printing in the order
they appear in Plater's object list.
psWipeTower now equals to new psToolOrdering indicating that
the ToolOrdering has been calculated (only if non-sequential mode is active).
psBrim now equals to new psExtrusionPaths
psExtrusionPaths shall be the last step before psWipeTower, indicating
that all the printing extrusions are calculated for the G-code preview
slider to edit the custom per print_z color changes, tool changes etc.
Skirt loops not being honored, only producing single loop #2193
First layer skirt only has half the loops when using multiple extruders #469
The skirt generator used to prime all printing extruders at the 1st layer
if enough skirt lines were configured, while at the other layers the skirt
used to be printed with the 1st extruder printing the layer.
There was a bug introduced quite a long time ago, where not enough skirt
lines were extruded if some extruders were not needed to print the 1st layer.
Newly the skirt generator works the same way on all layers:
All the extruders planned to print a layer are primed over the skirt
if enough skirt lines are configured.
Refactoring of GCode export of color changes, extruder switches etc,
so that the "color change" like extruder switches are applied first
at the Wipe Tower / G-code export, so that adding / removing
an extruder switch at the G-code preview slider does not invalidate
slicing.
1) Don't allocate ExtruderOverrides if not necessary
2) Use boost::container::small_vector<int32, 3) for ExtruderOverrides
(usually less than 4 instances are printed))
If the Elephant foot compensation is applied to the 1st object's layer,
the uncompensated 1st object's slice is newly used for calculation
of bridges, overhans, skirt, brim, raft and supports.
Layer::slices were renamed to Layer::lslices to simplify reading
of the code, to differentiate from LayerRegion::slices.
Fixed layouts after the second opening of the dialog.
(Removing any extruder from the sequence does not cause an incorrect layout)
Validation of entered values added
(0 is not a valid value)
1) Start PrusaSlicer
2) Select printer: Original Prusa i3 MK2.5
3) Load any stl file
4) In Printer Settings turn on "Support stealth mode"
5) Press "Slice now"
-> crash
All the "machine_XXXXX" vectors in the print config contain a single value instead of two leading to a vector subscript out of range
when read into GCode::_do_export()
Layer newly remembers bounding boxes of slices,
the bounding boxes are used by G-code generator & newly the support
generator.
Slices are stored as ExPolygons, not ExPolygonCollection.
for islands with another islands in their holes.
Improvement of chaining of infill lines for 3D honeycomb, Gyroid and
Honeycomb infill: New TSP chaining algorithm is used.
to avoid layers thinner than min_layer height, and possibly due to
the fact, that empty support extrusions may get generated
for support layers with non-empty support polygons.
Fix of Empty layers detection added to GCode.cpp (6ab1cec)
If the custom toolchange gcode switches extruder to the one that is expected, PrusaSlicer does not issue its own T command
Otherwise, this command is inserted just after the custom gcode, even in case it is not empty
This should prevent issues such as #2884 and #2886 from being reported
WARNING -> After this commit the exported gcode will contain the extra lines used by the time estimator. They will be removed by a future commit when a new post-process method will be implemented.
atomically. The code was taken from the llvm project, it is complex
and hopefully it covers all the Windows file system quirks. Vojtech
has highest hopes, that this will fix the various PrusaSlicer.ini
file corruptions.
Enabled the locales switching and error handling on Linux as well,
where now the missing locales are reported and running the locale-gen
tool is recommended.
Function set_extruder can be called before moving to the first layer, m_layer_index is then -1. We definitely don't want to set temperature for second layer in that case.
Linear advance is reset by filament start gcode after a toolchange. However, not all moves to the wipe tower
end with a toolchange (brim, empty grid) and it would therefore disable linear advance until the next toolchange
This should solve https://github.com/prusa3d/PrusaSlicer/issues/2770
Reported in https://github.com/prusa3d/PrusaSlicer/issues/2752 and was a result of setting support contact z distance to negative value.
This lowered the maximum allowed print_z of the next layer, even though previous layer had object layers too, so the penalty from the contact z should not have been applied.
Fixed simply by rejecting the negative contact_z.
That could happen on empty support layers which do not necessarily matter, since their spacing is not generally synchronized with the object
The new hopefully correct logic is "if there are extrusions on a layer, check that last layer with extrusions is at most the new layer height below
This is a fixup of changes from 0de6e53 and 6ab1cec
for the GLVolumes before sending to the GPU driver. The following commits
were partially reverted:
4269c8b23c Removed GLVolume non-VBO rendering
d15698e21e GLVolume and GLIndexedVertexArray refactored to send data to gpu at the first render call
Namely, the GLVolume buffers are "shrink to size"'d before sending their
content to the OpenGL driver, and the vertex buffers are populated
as quickly as possible from the GLVolume, so that the same buffer is not
kept twice in RAM on systems, where the RAM is shared with the graphics
card.
Also the memory allocation reporting was improved for the GLVolumes.
Added detection of empty layers so the wipe tower doesn't trip on them (it is not printable anyway).
This should improve wipe tower reliability with supports, objects standing on edges, etc.
I also turned an assert into exception throw to prevent hard crashes and nonsense output.
- wipe tower respects max volumetric flow, slowing down with PVA etc is not hardcoded anymore
- wipe tower is now allowed for multiple-extruder printers. single extruder stuff is not used in that case (ramming, cooling, etc.)
- start/end filament and toolchange custom gcodes are now inserted differently than before - see 41164a9
- some refactoring, e.g. the abstract WipeTower class was eradicated
These firmwares use M135 Tn and M108 Tn commands for changing active tool, which the analyzer did not recognize. The toolpaths were then rendered in wrong color, extruder offset etc. This surfaced in issue https://github.com/prusa3d/PrusaSlicer/issues/2566
Integration of the "cereal" serialization library.
Serialization / deserialization of the DynamicConfig / DynamicPrintConfig.
DynamicPrintConfig serializes ordinal identifiers instead
of the option key strings to conserve space.
- abstract class WipeTower and its descendant WipeTowerPrusaMM were merged into a single (non-abstract) WipeTower class
- all uses of WipeTower::xy struct were replaced by Eigen Vec2f (it is no longer necessary to be independent on libraries that PrusaSlicer uses)
- the WipeTowerPrusaMM.hpp/.cpp will be renamed in the next commit (hopefully it will retain its git history that way)
The priming extrusions were handled separately from the rest of the wipe tower toolchanges. In order to be able to use the logic from previous commit for them (custom toolchange gcodes etc), some unpleasant code shuffling was needed
Each toolchange now emits:
- end filament custom gcode
- toolchange custom gcode; if not provided, a standard Tn command is inserted
- start filament gcode
Hopefully it is now consistent for SE/ME printers with/without the wipe tower
The priming line does not work - will be fixed in the next commit
Missed adding [total_layer_count] to layer_gcode
Revert "Add new [total_layer_count] placeholder everywhere [layer_num] is avalible."
This reverts commit e29e766224a14e1f237908c3e5507ac5586ca5b7.
Revert "Missed adding [total_layer_count] to layer_gcode"
This reverts commit f07907a8acc450e9ae1220c6a9fe4f7c7e6d896c.
Better way to add [total_layer_count]
has been rewritten to be easier to parse.
Old format
; filament used = 19248.8mm (46.3cm3)
; filament used = 57.4
; filament cost = 1.5
; filament used = 8007.6mm (19.3cm3)
; filament used = 23.9
; filament cost = 0.6
; filament used = 0.0mm (0.0cm3)
; filament used = 0.0mm (0.0cm3)
; filament used = 0.0mm (0.0cm3)
; total filament cost = 2.1
New format
; filament used [mm] = 1600.7,1600.7,1600.7,1600.7,1600.7
; filament used [cm3] = 3.9,3.9,3.9,3.9,3.9
; filament used [g] = 4.8,4.8,4.8,4.8,4.8
; filament cost = 1.5,1.5,1.5,1.5,1.5
; total filament used [g] = 24.0
; total filament cost = 7.5
Where the non-printing extruders are filled in with zeros, and
the trailing non-printing extruders are not exported.
; filament used [g]
and
; filament cost
are only printed if non zero (material density and cost are defined)
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).
This is a fix of a long standing bug, where an extrusion is incorrectly
drawn from the end of the last wipe move. Interestingly enough,
this bug is in Slic3r at least since 1.2.9, but lucky enough
it only occured for single perimeter, no infill prints with wipe after
retract enabled, and only if the two successive slices were discretized
exactly the same, which is quite unlikely.
by PrintObject::region_volumes. This is due to the way Print::apply()
works, it does not invalidate an existing PrintObject if a new region
is added to the print.