Commit Graph

180 Commits

Author SHA1 Message Date
Enrico Turri
ebbebe3727 Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_gcode_viewer 2020-02-14 08:32:06 +01:00
Enrico Turri
131257cef1 GCodeProcessor basic framework 2020-02-14 08:31:31 +01:00
Enrico Turri
4a59a45d51 ENABLE_SHOW_SCENE_LABELS set as default 2020-02-13 13:24:52 +01:00
bubnikv
26a6a9b23f Fixed regression crashing when generating G-code with supports. 2020-02-10 16:37:38 +01:00
bubnikv
7655488639 Ammendment of
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.
2020-02-10 15:53:11 +01:00
bubnikv
9f40e9e56e 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.
2020-02-10 15:46:08 +01:00
bubnikv
bfbf3ac94d Follow up on the hot fix of #3637 53bfb6bed3
This is the correct solution, which maintains the optimization introduced
by 3e0690b37b
2020-02-10 14:24:28 +01:00
YuSanka
d81f7d8465 SlicedInfo: Removed secondes from estimated times 2020-02-10 12:52:32 +01:00
bubnikv
53bfb6bed3 Hot fix of Object disappears when wipe to object turned on #3637
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.
2020-02-10 08:24:39 +01:00
bubnikv
b8c898bf40 Fixed a bug in validation of the FDM Print to check for extruder
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.
2020-02-07 14:10:27 +01:00
bubnikv
fb235cb675 Color change - handling Color Change data stored for different
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.
2020-02-06 14:03:27 +01:00
Enrico Turri
6fa49f5931 Added sequential print order id to 3D scene labels 2020-02-03 11:44:26 +01:00
bubnikv
1278aabf3e Fixed some compiler warnings. 2020-01-30 13:00:51 +01:00
bubnikv
c5fa400208 Fixed regression of 71fa411100
where the PrintObject bounding box was not invalidated correctly
when the transformation matrices of instances changed.

Also refactored PrintObject::size() for const correctness.
2020-01-30 12:22:30 +01:00
YuSanka
1ed313ab79 Synchronized mode of color_print data to/from 3mf/amf
+ Code refactoring " CustomGCode extracted to separate namespace and file
2020-01-23 16:11:21 +01:00
bubnikv
71fa411100 Refactored PrintObject::m_copies to PrintInstances,
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.
2020-01-23 09:53:06 +01:00
bubnikv
cea7cbfaa0 The print order for sequential print now corresponds to the order
at the object list.
Partial fix of https://github.com/prusa3d/PrusaSlicer/issues/3455
2020-01-22 10:50:20 +01:00
lukasmatena
6100a71406
Merge pull request #3548 from KyleMaas/fix-ooze-prevention-issue-2901
Fix bug #2901 - Ooze Prevention on dual extruders (regression)
2020-01-21 14:41:41 +01:00
bubnikv
7efca35c27 Don't store "print_host", "printhost_apikey", "printhost_cafile"
into the G-code.
2020-01-21 09:55:44 +01:00
KyleMaas
53980d074e Fix bug #2901 2020-01-19 11:13:42 -05:00
YuSanka
2259f7b3e8 Code refactoring to mode comparison 2020-01-17 12:24:58 +01:00
bubnikv
8e5ba5ccc5 Added synonyms to some PrintSteps:
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.
2020-01-15 16:20:16 +01:00
bubnikv
10d1b459bb Fix of
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.
2020-01-14 16:38:34 +01:00
bubnikv
b54ce0d468 Fixing GCode Skirt generator after refactoring. 2020-01-14 14:24:38 +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
bubnikv
8bfc986fa7 Refactoring of GCode::process_layer().
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.
2020-01-14 10:31:18 +01:00
bubnikv
9038dc21e8 Fixing regression issue after G-code export refactoring. 2020-01-10 15:51:35 +01:00
bubnikv
702a489b03 Fixing compilation isue on non-MS compilers. 2020-01-10 11:53:39 +01:00
bubnikv
15eedef74b Refactoring of ToolOrdering (wipe into infill / object)
Refactoring of GCode::_do_export()
Helper lower_bound and search functions similar to std, but without
needing the value object explicitely.
2020-01-10 11:27:04 +01:00
bubnikv
5bb9ba64c2 Fix of previous commit 2020-01-09 10:14:50 +01:00
bubnikv
de70adca9c Optimization of G-code export: Don't make copies of ExtrusionEntities
when sorting them into Extruders / Islands / Regions.
2020-01-09 10:00:48 +01:00
YuSanka
0aaa7dd076 Small fix for 3e0690b37b 2020-01-08 15:44:39 +01:00
bubnikv
3e0690b37b Further optimizations of G-Code generator when Wipe into object / infill:
Don't do unnecessary tests if it is known that there is
no Wipe into object or infill active.
2020-01-08 15:16:31 +01:00
bubnikv
e0811e4aa5 Optimization of G-code export:
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))
2020-01-08 14:58:24 +01:00
bubnikv
3d17543d40 Fix of "Don't use bridging perimeters on top of elephant-foot compensation #3011"
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.
2020-01-03 14:07:31 +01:00
YuSanka
8824468882 Added function to update of custom_gcode_per_print_z in Model from configuration
considering "colorprint_heights" option.

Changed thumb_up/down icons to better preview (feedback from #3256)

Commented some uncertain code
2019-12-17 14:16:38 +01:00
YuSanka
afcc6bbb08 Code refactoring for Color change implementation 2019-12-17 08:37:50 +01:00
Lukas Matena
c284a65caa Warning fix: removed needless tautological check 2019-12-12 10:45:30 +01:00
Enrico Turri
61ab9e37d6 #3287 - Fixed GCodeAnalyzer and GCodeTimeEstimator when using Machinekit and Mach3/Linuxcnc gcode flavours 2019-12-09 11:40:26 +01:00
YuSanka
805a6c936c Localization improvements: Text correction 2019-12-06 13:58:23 +01:00
Lukas Matena
4ba7cb7ede Fix of the wipe tower starting point
see issues #2968, #3234 and #3248
2019-12-04 13:47:02 +01:00
Enrico Turri
ddd1df1552 ENABLE_THUMBNAIL_GENERATOR -> render printbed into thumbnails 2019-11-28 14:18:24 +01:00
YuSanka
dfd38c7818 Merge remote-tracking branch 'origin/master' into ys_color_print_extension 2019-11-28 09:01:14 +01:00
YuSanka
901a20b3b1 Code cleaning 2019-11-27 15:27:44 +01:00
YuSanka
496e09302f Implemented a message on Printer display for pause print
+ Added new icons
2019-11-27 14:44:33 +01:00
Enrico Turri
1ba3f0a4f6 Transparent background for thumbnails saved into gcode and sl1 files 2019-11-27 13:37:37 +01:00
Enrico Turri
b1047d2e26 ENABLE_THUMBNAIL_GENERATOR -> ENABLE_THUMBNAIL_GENERATOR_PNG_TO_GCODE set as default 2019-11-25 10:30:31 +01:00
Enrico Turri
6df506e482 ENABLE_THUMBNAIL_GENERATOR -> Thumbnails generated using a callback function 2019-11-22 12:39:03 +01:00
YuSanka
bc68b8eaf2 ExtruderSequenceDialog :
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)
2019-11-16 02:12:37 +01:00
YuSanka
0fb8b2ce09 Delete color changes for unused extruders 2019-11-15 16:36:29 +01:00