Commit Graph
100 Commits
Author SHA1 Message Date
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
Lukas Matena a643a22151 Wipe tower - renaming files (to conclude work from previous commit and not lose history of those files) 2019-06-17 10:26:33 +02:00
Lukas Matena 05e6dbbe4b Wipe tower - refactoring (removed the abstract WipeTower class)
- 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)
2019-06-17 10:16:07 +02:00
Lukas Matena 7b07a8da83 Reset buttons: synchronization of instances/volumes 2019-06-14 15:28:09 +02:00
Lukas Matena 980c6673d4 Reset buttons - fixed rotation of instances with multiple volumes
Mirroring buttons now hide where appropriate
2019-06-14 15:28:09 +02:00
Lukas Matena a3c1644ead Added mirroring buttons into object manipulation panel 2019-06-14 15:03:42 +02:00
Lukas Matena 9f236bc603 Added transformation reset buttons in object manipulation panel 2019-06-14 15:03:42 +02:00
Lukas Matena 0eecfc6604 Wipe tower - removed the obsolete material_type enum
no longer necessary because the speed overrides that the enum controlled were recently removed
the comment in gcode is now just about appending the config string
2019-06-14 14:44:22 +02:00
Lukas Matena 678d0e18a7 WipeTowerIntegration class: print_z is not passed around, ToolChangeResult objects are aware of it 2019-06-14 14:43:40 +02:00
Lukas Matena aee376762e Changed handling of priming extrusions to allow injection of filament and toolchange custom gcodes
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
2019-06-14 14:42:07 +02:00
Lukas Matena 41164a9cb3 Multimaterial printing: Changed the way how custom gcodes are inserted
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
2019-06-14 14:38:58 +02:00
Lukas Matena 9df93c0125 Mostly refactoring of the wipe tower improvements
- setting of the wipe tower parameters based od whether SE MM printer is selected is done in the WipeTowerPrusaMM constructor, so it does not distract in Print.cpp
- WipeTowerPrusaMM.cpp conditions checking for SE MM printer are now using a more descriptive const member variable, not the loading/unloading speeds (hopefully the functionality is the same)
2019-06-14 14:35:50 +02:00
Lukas Matena 079e63e190 The wipe tower now respects filament max volumetric flow
The odd commands that lowered the speed override values for PVA, FLEX etc. were removed

Now the wipe tower backups user speed override, sets it to 100%, does what is needed
and restores the old value when finished. There are no special cases - lowering
the speed for certain materials can be achieved by lowering the volumetric flow.
2019-06-14 12:28:52 +02:00
Lukas Matena 6f7051c3b1 GCode preview shows correct volumetric flow for the wipe tower
The neccessary annotations for the GCodeAnalyzer were missing
2019-06-14 12:28:52 +02:00
Lukas Matena 66a56941a5 SLA dialog: Prevented the slider to have zero width, even in case the text width is calculated incorrectly 2019-05-27 15:36:51 +02:00
Lukas Matena 07282eb24d Fixed unit tests when run with range checks on std::vector
There was a bug in unit tests that led to generating the wipe tower with non-normalized preset.
This caused out-of-bounds access into max_layer_height vector in fill_wipe_tower_partitions.
The problem surfaced in https://github.com/prusa3d/PrusaSlicer/issues/2288.
I quickly patched additional normalization of the preset to prevent this from happening.

Also, an assert in the same function turned out to trip on one of the tests.
This one was commented out for now and will (hopefully) be looked into later.

Function Print::apply_config was renamed to apply_config_perl_tests_only so everyone
sees its current purpose and does not mistake it for the more important Print::apply.
2019-05-22 16:48:20 +02:00
Lukas Matena 03a62e5721 Fixed rendering of support points in SLA gizmo for mirrored objects 2019-05-20 16:33:57 +02:00
Lukas Matena 1e99454602 Hopefully fixed SLA dialog scaling issues on OSX 2019-05-13 15:10:01 +02:00
Lukas Matena 76c3da9aba An attempt to fix the SLA gizmo dialog so it does not crop long description on the sliders 2019-05-13 15:10:01 +02:00
Lukas Matena 5dbcec5126 Turn off the SLA gizmo when switching to FFF printer profile 2019-05-10 11:32:30 +02:00
Lukas Matena cf3b992269 GCode.cpp: Update the 'current_extruder' placeholder even if filament start gcode is empty 2019-05-06 14:48:59 +02:00
Lukas Matena e9a53e49db Arrange is accounting for the wipe tower now 2019-05-06 08:14:45 +02:00
Lukas Matena 5f226c5d7f Allow wipe tower rotation by the rotation gizmo 2019-05-06 08:14:45 +02:00
Lukas Matena 3ec17fae67 A hotfix for #2179 (GCode preview crash on T-1 in GCode) 2019-04-29 14:26:46 +02:00
Lukas Matena ae692635da Selection rectangle moved into a separate class 2019-04-24 13:25:41 +02:00
Lukas Matena 08cb5bc2c7 Wipe tower uses correct gcodes for RepRap gcode flavor (M907->M906, M900->M572 - should fix #1843)
Also, fixed proper setting of the extruder current during toolchange (was broken since 6da83c7)
2019-04-24 12:09:58 +02:00
Lukas Matena 7185125f9c Fixed out-of-bouds access in RammingChart.cpp in case the ramming was turned off 2019-04-24 10:12:23 +02:00
Lukas Matena 55c07394e5 Added dialog with shortcuts to the SLA gizmo, tried to improve the dialog look 2019-04-18 15:46:35 +02:00
Lukas Matena cfbd7f8093 Fixed conflicts after cherry-picking c8b4aa5a786e579abfdbf800b5eb1a0f0b04ff92 2019-04-18 10:32:47 +02:00
Lukas Matena 0c1e223414 SLA gizmo clipping plane is now not necessarily perpendicular to camera direction 2019-04-17 14:27:20 +02:00
Lukas Matena 8df2a19974 SLA clipping plane can now be controlled by Ctrl + mouse wheel rotation 2019-04-17 14:27:20 +02:00
Lukas Matena 19759b4315 SLA gizmo clipping - changed color on the cuts of supports, turned their rendering in editing mode (when the supports are not shown) 2019-04-17 09:39:51 +02:00
Lukas Matena 63ce3c3150 SLA gizmo now does not make redundant copies of the object and supports meshes 2019-04-16 09:04:04 +02:00
Lukas Matena f33e9bf609 TriangleMeshSlicer is now initialized by const-pointer to the mesh, responsibility for calling require_shared_vertices is left to the caller 2019-04-16 09:04:04 +02:00
Lukas Matena a177a7e1da SLA gizmo clipping now also triangulates the cuts on support structure 2019-04-16 09:04:04 +02:00
Lukas Matena 4abcf7bec4 SLA gizmo dialog height increased so the new clipping plane slider fits 2019-04-12 14:25:41 +02:00
Lukas Matena 096d23f971 SLA gizmo fix: Discarding manual edits on autogenerated points removed all the points from the gizmo cache 2019-04-10 15:27:44 +02:00
Lukas Matena 678c513cb9 Merge branch 'master' into lm_sla_gizmo_clipping_plane 2019-04-10 13:43:02 +02:00
Lukas Matena e6439ad010 SLA gizmo fix: recalculation of the mesh was sometimes skipped 2019-04-10 13:33:58 +02:00
Lukas Matena 3a09f66e51 Fixed a literal in vertex shader that refused to compile on OSX 2019-04-08 16:05:18 +02:00
Lukas Matena f71e14a4d9 SLA gizmo now uses ctrl to add to selection and alt to remove from selection 2019-04-08 15:34:42 +02:00
Lukas Matena 837bc43c9f SLA gizmo on_set_state code is now called through CallAfter to prevent repeated wxMessageDialog appearances (seen on OSX) 2019-04-08 11:56:13 +02:00
Lukas Matena eadf7daa37 Merge branch 'master' into lm_sla_gizmo_clipping_plane 2019-04-08 10:50:10 +02:00
Lukas Matena 09cf1b9b00 Allowed general object transformation and SLA z-shift (clipping plane) 2019-04-08 10:31:53 +02:00
Lukas Matena 7531f2d5e7 Selection rectangle now respects the clipping plane position 2019-04-08 10:31:22 +02:00
Lukas Matena bbda1896f9 The gizmo is now able to triangulate and show the cut, the triangulated cut is cached 2019-04-08 10:31:19 +02:00
Lukas Matena 9b7857aaab SLA gizmo clipping plane logic moved to fragment shader
This means the clipping now works again with both legacy and modern OpenGL
2019-04-08 10:31:16 +02:00
Lukas Matena 273fcf68a1 SLA gizmo now uses glClipPlane instead of touching projection matrix
Messing with the projection matrix invalidates the z-buffer
This currently only works in OpenGL legacy mode
2019-04-08 10:31:13 +02:00
Lukas Matena bc9164e40c SLA gizmo now respects the clipping plane when rendering points and raycasting mouse onto mesh 2019-04-08 10:31:10 +02:00
Lukas Matena fd1f9d65fb First steps on SLA clipping plane 2019-04-08 10:31:04 +02:00
Lukas Matena 177f5b02fa Disabled layer editing mode for SLA 2019-04-05 09:51:58 +02:00
Lukas Matena 69027b53fd SLA gizmo now allows to deselect a point 2019-04-03 14:44:24 +02:00
Lukas Matena 2269e1b183 Deliberately setting the SLA dialog a bit too large
It is not possible to precisely calculate actual window size before the rendering, so I added a safety margin.
It would be nicer to let the window autoscale and only use the inflated dimension for possible moving the window upward to prevent collision with the bottom panel, but...
ImGui autoscaling does not work properly for some reason (the window size autoscales only after a mouse move), so this is a workaround.
2019-04-03 10:41:45 +02:00
Lukas Matena e20ffbfd85 SLA gizmo uses CallAfter to trigger SLA supports calculation to prevent recursive rendering calls 2019-04-02 09:36:16 +02:00
Lukas Matena 5f66a2d181 SLA gizmo dialog now respects system font settings 2019-04-01 14:51:18 +02:00