Commit Graph
100 Commits
Author SHA1 Message Date
Lukas Matena 546917830b Initial implementation of MeshClipper class
So far the work is shared between the old code in GLGizmoSlaSupports.cpp and the new class
2019-09-13 12:03:53 +02:00
Lukas Matena cf23146ee3 Refactoring the SLA clipping plane
The plane is now internally stored as a plane in world coordinates
2019-09-13 12:03:53 +02:00
Lukas Matena 2fef16c39a Fix of #1266 and #2258
In case there were empty object layers supposed to be floating on supports which were set to use a specific extruder, wipe tower was missing layer required to do the toolchange, leading to a crash
Such cases are now detected and layers that need it are additionally assigned as wipe tower layers

Also tracked as SPE-526
2019-09-10 13:13:21 +02:00
Lukas Matena 4fc20090c8 GUI_ObjectList.cpp: Max layer height defaults to 0.75*nozzle_diameter as it should (#2892) 2019-09-10 12:34:03 +02:00
Lukas Matena c5f78dd6e2 Some more warnings fixed (WipeTower.cpp/.hpp) 2019-09-10 12:08:43 +02:00
Lukas Matena 86b258f727 Fixed many warnings in following files:
src/slic3r/Config/Snapshot.cpp
src/slic3r/GUI/Field.cpp
src/slic3r/GUI/GLToolbar.cpp
src/slic3r/GUI/GUI_ObjectList.cpp
src/slic3r/GUI/GUI_ObjectList.hpp
src/slic3r/GUI/Plater.cpp
src/slic3r/GUI/Plater.hpp
src/slic3r/GUI/PresetBundle.cpp
src/slic3r/GUI/Tab.cpp
src/slic3r/GUI/wxExtensions.cpp
2019-09-10 12:08:43 +02: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 4dbc8b22a5 Updated tooltip 2019-09-09 16:39:26 +02:00
Lukas Matena 97a02f4412 Merge branch 'lm_custom_toolchange' 2019-09-09 16:12:09 +02:00
Lukas Matena 822bc7a91c Fix of previous commit, tooltip update 2019-09-09 16:02:39 +02:00
Lukas Matena 499fdeddd1 Custom toolchange gcode is searched for tool-changing command
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
2019-09-09 13:05:18 +02:00
Lukas Matena a985a2720f Fixed some more warnings, moved function to get ExtrusionRole name into ExtrusionEntity.hpp
So it can be called from wherever it may be needed
2019-09-06 15:55:07 +02:00
Lukas Matena 3f988b314c Fixed several warnings (Config.hpp and few other files) 2019-09-06 15:55:07 +02:00
Lukas Matena 6cc29c308c Fill.cpp: Fixed a typo 2019-09-05 16:03:44 +02:00
Lukas Matena 09e4ac42ba Fixed some more warnings (mostly GLGizmoSlaSupports.cpp) 2019-09-04 16:05:32 +02:00
Lukas Matena 570bec299f Merge branch 'master' into dev 2019-09-04 15:50:18 +02:00
Lukas Matena 326eb5e343 GUI_ObjectList.cpp: Fixed a crash when deleting instances.
Deleting second-but-last instance deletes the whole Instances node, we must select object node in that case.
2019-09-04 15:15:35 +02:00
Lukas Matena 805a5d22a1 Fixed couple of warnings in WipeTower.cpp, ToolOrdering.cpp and GCode.cpp 2019-09-04 14:56:35 +02:00
Lukas Matena fd47891793 GLGizmoSlaSupports.cpp: Snapshot label now differs for turning the gizmo on/off
This behaviour was broken by recent merge
2019-09-03 10:16:06 +02:00
Lukas Matena b89d9c7aff Merge branch 'lm_gizmomanagerrefactoring' into dev 2019-09-03 08:29:31 +02:00
Lukas Matena 66d74bc591 Merge branch 'lm_layer_height_validation' into dev 2019-09-02 16:31:59 +02:00
Lukas Matena 7d54b04699 Merge branch 'lm_wiping_dialog_colors' into dev 2019-09-02 16:31:22 +02:00
Lukas Matena 9ac6909d30 Fixed couple of warnings in GUI_ObjectList.cpp and GUI_ObjectSettings.cpp 2019-09-02 16:27:48 +02:00
Lukas Matena 942f959e87 Fixed couple of warnings
Turned several includes into forward declarations
Removed several sprintf calls in favor of std::to_string
2019-09-02 16:27:48 +02:00
Lukas Matena 19ab746a38 Merge branch 'master' into lm_gizmomanagerrefactoring 2019-09-02 14:31:03 +02:00
Lukas Matena d8a274c5ab Nearly finished refactoring of GLGizmoManager 2019-09-02 14:30:15 +02:00
Lukas Matena 409a7c7734 SLA gizmo open/close should be saved on undo/redo stack 2019-09-02 14:30:15 +02:00
Lukas Matena b6d35c9840 Started an attempt to refactor GLGizmoManager 2019-09-02 14:30:12 +02:00
Lukas Matena b43003dfad Fixed layer height equality check needed in order to enable the wipe tower
The change was needed because enabling the new layer-height-modifier made the validation fail, even if there was no real layer height modification
2019-08-29 16:13:04 +02:00
Lukas Matena 350b7cbe04 Fixed out-of-bounds access when adding a colorchange before the first layer
Fixed several signedness related warnings
2019-08-29 12:03:42 +02:00
Lukas Matena af2a3d2c08 Fixes of the wipe tower
- added an extra travel move after a toolchange
- wipe tower only sets temperatures with single extruder MM printers
- ooze prevention does not work with the wipe tower - added a check into Print::validate()
2019-08-28 16:28:22 +02:00
Lukas Matena 4992b8f749 ConfigManipulation.cpp: Fixed couple of memory leaks due to heap-allocated wxMessageDialogs that were never freed 2019-08-27 13:27:11 +02:00
Lukas Matena 42c5c19f1c GCodeWriter.cpp: Fixed skipped z-lifts when its height was equal to layer height (https://github.com/prusa3d/PrusaSlicer/issues/2154) 2019-08-27 12:41:00 +02:00
Lukas Matena 3addae3bb4 GCode.cpp: Avoid crossing perimeters performance optimization 2019-08-23 13:06:29 +02:00
Lukas Matena 1d8e060b75 Followup of previous commits - removing some unnecessary code 2019-08-23 12:11:45 +02:00
Lukas Matena bf232e1ade Fixed forward declaration of struct Slic3r::UndoRedo::Snapshot so MSVC does not complain 2019-08-23 10:34:16 +02:00
Lukas Matena 52933d1bab Recalculate SLA supports after undo/redo in case SLA gizmo was active and had supports when the snapshot was taken 2019-08-23 01:42:59 +02:00
Lukas Matena b55a140ad4 SLA gizmo takes snapshots on opening and closing 2019-08-23 01:42:59 +02:00
Lukas Matena c736b657d4 SLA gizmo now refuses to close with unsaved changes in editing mode 2019-08-23 01:42:59 +02:00
Lukas Matena 24b9c926c6 GLGizmoManager.cpp: Initial work on the possibility of a gizmo refusing to close 2019-08-23 01:42:59 +02:00
Lukas Matena e928c0ac0b Added a missing include 2019-08-22 11:35:25 +02:00
Lukas Matena 6a22651501 Fixed a typo preventing compilation on Linux 2019-08-20 20:24:37 +02:00
Lukas Matena 53939796a6 GCode.cpp: Fix of temperature change before print
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.
2019-08-20 14:22:31 +02:00
Lukas Matena 92bdb68e11 Extended the error message when empty layers are detected 2019-08-19 15:50:49 +02:00
Lukas Matena a66c59941d Better error message in case of corrupted PrusaSlicer.ini 2019-08-19 12:55:57 +02:00
Lukas Matena 0f32223ba0 WipeTower: linear advance is disabled immediately before ramming, not before moving to the wipe tower
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
2019-08-16 00:20:51 +02:00
Lukas Matena c8ac46df43 Fixed some memory leaks related to heap-allocated wxDialogs
Some correctly destroyed dialogs were also converted to stack-allocated
2019-08-15 12:52:56 +02:00
Lukas Matena 15744f021a Print::validate: added epsilon checks on nozzle and filament diameter validation (https://github.com/prusa3d/PrusaSlicer/issues/2737)
Changed messagebox text after changing extruder diameter with single extruder printers so it is more obvious why it shows

In case nozzle diameters differ and someone checks 'single_extruder_mm', PrusaSlicer asks whether all diameters should be unified. Answering NO did not undo the SEMM check. It does now.
2019-08-15 10:43:17 +02:00
Lukas Matena c84b1ca34b Multimaterial initial priming for non-Prusa printers (https://github.com/prusa3d/PrusaSlicer/issues/1121)
The initial priming now does not assume anything about bed width and always uses the space it has
In case of circular beds it places the priming lines along the diameter
Custom beds are not supported (they are treated as circular with no extra checks whether it is sane)
Slight refactoring of the WipeTower class (constructor now gets reference to PrintConfig and not the individual values, same with set_extruder). This was legacy from times when the wipe tower was meant to be abstract and independent on the rest)
2019-08-15 01:41:46 +02:00
Lukas Matena c189140221 Fixed a false positive empty layer report
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.
2019-08-13 11:02:58 +02:00
Lukas Matena 1b5d561b7c Added handling of std::bad_alloc so the user gets more comprehensible error message
Call to boost::nowide::nowide_filesystem() was made Windows only
2019-08-08 16:55:25 +02:00
Lukas Matena 1789179506 GLGizmoSlaSupports.cpp: unproject_on_mesh does not throw exceptions but uses bool return value to signal success 2019-08-07 16:17:41 +02:00
Lukas Matena 8e4f777bd3 One more fix on the empty layers detection - support contact z distance is taken into account
If it wasn't, anything with raft would be rejected unless contact z was zero. We do not want that.
2019-08-07 12:02:30 +02:00
Lukas Matena f61c982111 GCode.cpp: fixed detection of empty layers so it doesn't give false positives
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
2019-08-07 10:54:36 +02:00
Lukas Matena b0d4cb6e06 Memory usage is now shown in SysInfoDialog on all three platforms 2019-08-05 20:17:29 +02:00
Lukas Matena 6da196b419 Corrected return value of ConfigOptionVector::apply_override to what was intended (this didn't cause any bug though, the return value is currently not used) 2019-08-05 15:24:49 +02:00
Lukas Matena 3efae8a03e Added a memory logging function for Mac and Linux 2019-08-05 13:39:03 +02:00
Lukas Matena 0de6e53219 Followup of 6ab1cec - empty layers are ok if there are only other empty layers on top of them
Also fixed a possible crash in Print.cpp when preparing the wipe tower layers
2019-08-04 22:57:59 +02:00
Lukas Matena 6ab1cec48c Empty layers detection added to GCode.cpp
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.
2019-08-02 16:54:18 +02:00
Lukas Matena 170bd8b064 Wipetower fix: temperature-changing command was sometimes missing after the toolchange
Cause: variable holding last issued temperature was not reset where it should have been
This should fix issue #2685
2019-08-01 15:31:02 +02:00
Lukas Matena 98e08e356f Changed snapshot names for reset scale/reset rotation/drop to bed functions (it's done a bit simpler this time) 2019-08-01 12:41:31 +02:00
Lukas Matena 81ab43ea9a Revert "Changed snapshot names for reset rotation/reset scale/drop to bed functions"
This reverts commit 1ca8ff1285.
2019-08-01 12:23:39 +02:00
Lukas Matena 1ca8ff1285 Changed snapshot names for reset rotation/reset scale/drop to bed functions 2019-08-01 10:58:52 +02:00
Lukas Matena aeb29b1184 SLA points on all objects are assigned Generating status before the background processing starts 2019-07-31 13:00:35 +02:00
Lukas Matena 599f2e07db Config parameters accessible from SLA gizmo are now saved on the undo/redo stack 2019-07-31 12:40:47 +02:00
Lukas Matena ab0d1af3ca Fixed a problem with deleting button in SLA gizmo 2019-07-31 10:33:03 +02:00
Lukas Matena 99f34f8321 SLA gizmo: fixed a crash with multiple selection 2019-07-31 10:18:49 +02:00
Lukas Matena 94f9b701e2 Merge branch 'lm_sla_gizmo_undo' 2019-07-30 14:52:44 +02:00
Lukas Matena 07608a80cd SLA gizmo - making sure the cone direction is correctly undone/redone 2019-07-30 14:51:57 +02:00
Lukas Matena 7f33e23fbb Added new icons for mirroring buttons and 'drop modifier to bed' function 2019-07-30 08:39:38 +02:00
Lukas Matena eeef3b42df SLA gizmo now uses the new separate undo/redo stack for manual editing mode 2019-07-29 13:07:49 +02:00
Lukas Matena fe62362960 Hiding the sla support structures after undo/redo 2019-07-28 11:37:08 +02:00
Lukas Matena 0ae46b0635 SLA gizmo and undo/redo: 'autogenerated points' state is now correctly undone/redone 2019-07-23 15:23:38 +02:00
Lukas Matena 0a5f8aa2e8 An attempt to silence the Wreorder warning on OSX build server
Clang apparently cares about order of command line arguments, so -Wall should come before -Wno-whatever
2019-07-23 15:13:47 +02:00
Lukas Matena 91a5d70a62 Fixed a few warnings in headers (meaning they were reported once for each include)
Fixed an identification of CXX compiler in cmake so that 'AppleClang' is recognized
2019-07-23 14:02:20 +02:00
Lukas Matena 506be9035b Wipe tower now supports filaments with diameters different from 1.75 mm 2019-07-23 14:02:20 +02:00
Lukas Matena 2c6e4b4e5b Fixed a missing include in UndoRedo.cpp 2019-07-23 09:40:07 +02:00
Lukas Matena eb29c3e01d Wipe tower accounts for extruder offsets
Also, in case of non-single-extruder printer with the wipe tower, first wiping line was printed where the border should have been - fixed
2019-07-19 13:00:10 +02:00
Lukas Matena fca5562c6c Process start_filament_gcode in case of usual single extruder printer
Reported in https://github.com/prusa3d/PrusaSlicer/issues/2652
2019-07-19 10:02:52 +02:00
Lukas Matena 2b9d285a16 'Place on face' gizmo fix (it used invalid pointer after undo/redo was implemented) 2019-07-17 15:39:58 +02:00
Lukas Matena 81dde630ea SLA support points edits are now pushed onto undo/redo stack 2019-07-17 15:39:58 +02:00
Lukas Matena 52ab8a5f19 Wipe tower fix (do not skip the first toolchange when printing without the wipe tower)
Also, test multi.t updated so it matches new logic of inserting custom gcodes
2019-07-16 13:10:09 +02:00
Lukas Matena dc80616bf6 Fixed a use-after-free problem in object list
this was uncovered by ASAN when attempting to Delete All objects with multiple instances
2019-07-15 17:09:06 +02:00
Lukas Matena 004e2719b1 Merge branch 'master' into lm_warnings 2019-07-15 13:26:55 +02:00
Lukas Matena 63cf5edf28 Updated tooltips on custom gcodes to match actual PrusaSlicer behaviour to reflect recent changes 2019-07-15 11:49:30 +02:00
Lukas Matena e674c586b0 Merge branch 'lm_improving_wipe_tower'. Summary of changes:
- 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
2019-07-15 10:25:38 +02:00
Lukas Matena 45db42ca3b Merge branch 'lm_drop_to_bed' 2019-07-12 13:38:18 +02:00
Lukas Matena 2ee572bd31 GCodeAnalyzer now recognizes tool-changing commands with MakerWare and Sailfish flavor
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
2019-07-12 12:56:41 +02:00
Lukas Matena 4b9e366f00 Multimaterial print - making sure that temperatures will be changed with SE printer without the wipe tower 2019-06-26 14:50:12 +02:00
Lukas Matena d2136ab625 ObjectList no longer caps number of extruders to 9 (fixes https://github.com/prusa3d/PrusaSlicer/issues/2558) 2019-06-26 13:12:25 +02:00
Lukas Matena d845332de1 Fixed a crash when using place to bed function with the layer editing active
This was caused by trying to render a deleted layer height profile. Other gizmos were
not affected because they are not dragging at the time of their action, so the profile
was correctly recalculated for them.
2019-06-26 11:51:18 +02:00
Lukas Matena cb916c4dda Fixed warnings in libslic3r 2019-06-25 16:04:29 +02:00
Lukas Matena 471331e8c1 CMake: -Wignored-attributes is not supported in GCC<6.1
-turned off -Wunknown-pragmas for GCC
2019-06-25 16:04:24 +02:00
Lukas Matena 743a08f0cf WipeTower - fixed a crash in extrude_explicit when called from finish_layer before the first toolchange 2019-06-21 10:58:20 +02:00
Lukas Matena 82de7bedb1 WipeTowerDialog.cpp - wxEXPAND conflicted with wxALIGN_CENTER_HORIZONTAL (triggered a wxWidgets assert) 2019-06-19 14:52:42 +02:00
Lukas Matena 0481f33ceb Drop to bed function now accounts for instance transformation 2019-06-19 11:53:08 +02:00
Lukas Matena 3d8c3804fa Added 'drop to bed' button into object manipulation panel 2019-06-19 11:04:12 +02:00
Lukas Matena 5a1e1bc10c GUI_ObjectManipulation.cpp - Removed implicit capture by value in some of the lambdas 2019-06-19 11:04:12 +02:00
Lukas Matena 95ad76a0dc Wipe tower - fixed a long existent bug that sometimes resulted in inexact feedrate on the loading moves 2019-06-17 12:59:30 +02:00
Lukas Matena 1152bd5a09 Fixup of 41164a9
The WipeTowerWriter did not now which tool is being used, so it limited the volumetric flow based on different filament settings
2019-06-17 11:22:17 +02:00