Commit Graph
100 Commits
Author SHA1 Message Date
Lukas Matena 51739b70a1 FDM supports gizmo cursor size now accounts for (uniform) scaling of the mesh
Added tooltips on the sliders
2020-04-09 18:36:57 +02:00
Lukas Matena 23da5910c6 FDM supports gizmo now uses VBOs instead of immediate mode 2020-04-09 15:56:43 +02:00
Lukas Matena 3e15d22f35 Fixed a crash when switching to Preview 2020-04-08 17:22:30 +02:00
Lukas Matena d3bb966f4d Merge branch 'lm_fdm_supports_gizmo' 2020-04-08 16:11:49 +02:00
Lukas Matena 23fbc2ff1a Alt+mouse wheel adjusts cursor size in FDM supports gizmo 2020-04-08 15:21:41 +02:00
Lukas Matena 4d8e6538e8 FDM supports gizmo - use right mouse to place support blockers 2020-04-08 14:59:53 +02:00
Lukas Matena 55c87886fa FDM supports gizmo now ignored modifiers and support enforcer/blockers 2020-04-08 12:58:48 +02:00
Lukas Matena c32fa67523 Clipping plane can now handle multiple-part objects 2020-04-08 11:52:22 +02:00
Lukas Matena ba08d5da9e Fix of #3983 - Crash caused by a typo in Korean localization 2020-04-08 10:37:26 +02:00
Lukas Matena fe57826695 Improved the FDM supports gizmo dialog
Removed unused code
Fixed a clipping-plane related crash
Fixed a crash in hollowing gizmo when no hollowed mesh was provided
Forbid opening the gizmo when a part of an object is selected
2020-04-08 09:37:49 +02:00
Lukas Matena 17811598ac Fixed obvious merge conflicts
FDM supports gizmo uses the new common data infrastructure
2020-04-07 19:44:29 +02:00
Lukas Matena a380053a17 Merge branch 'lm_gizmos' into lm_fdm_supports_gizmo 2020-04-07 17:16:48 +02:00
Lukas Matena f1fd445ce6 Merge branch 'lm_gizmos_data_pool'
The branch contains refactoring of common gizmos data handling
2020-04-07 17:03:03 +02:00
Lukas Matena 1d65ce760b Removed obsolete code
Got rid of dummy header GLGizmos.hpp
2020-04-07 16:47:39 +02:00
Lukas Matena 535a27de65 Fixed crash related to ClippingPlane and incorrect handling of sla z shift in hollowing gizmo 2020-04-07 16:47:39 +02:00
Lukas Matena c704849a7a SLA supports gizmo is now enabled and uses the new infrastructure 2020-04-07 16:47:39 +02:00
Lukas Matena c79e90b921 SupportsClipper implementation 2020-04-07 16:47:39 +02:00
Lukas Matena e82ead0335 InstancesHider allows to show/hide supports on demand 2020-04-07 16:47:39 +02:00
Lukas Matena 5d4014a4a5 ObjectClipper implementation, hollowing gizmo reenabled
ObjectClipper tracks active mesh (incl. possible hollowing), remembers clipping plane position and can render the cut on demand
Hollowing gizmo uses the new infrastructure
2020-04-07 16:45:16 +02:00
Lukas Matena d9e5721cb7 Raycaster can now handle multiple volumes
This is necessary for future FDM supports gizmo. SLA objects only have one volume, so it wasn't needed until now.
2020-04-07 16:42:59 +02:00
Lukas Matena bf734c8f68 Raycaster wrapper
The raycaster manages a MeshRaycaster object that the gizmo can ask to perform raycasts
If the hollowed mesh tracker is enabled and the hollowed mesh is newly calculated/invalidated, the raycaster automatically updates.
2020-04-07 16:40:59 +02:00
Lukas Matena 81dba7677b Hollowed mesh tracker implementation
The class tracks state of the backend calculation and if there is a hollowed/drilled mesh, it can provide a pointer to it
2020-04-07 16:40:10 +02:00
Lukas Matena 7e797eaaf8 Dependencies check in debug mode
Some common resources can depend on each other - this checks that the requirements are consistent
2020-04-07 16:39:18 +02:00
Lukas Matena 3db3a61520 InstancesHider implementation
Any gizmo can now ask for hiding all but the active instance by returning proper value from on_get_requirements
2020-04-07 16:39:06 +02:00
Lukas Matena 593e7a1546 Flattening gizmo now uses the new CommonDataPool to store pointer to active object 2020-04-07 16:35:52 +02:00
Lukas Matena 3b06332999 Common gizmos data are now handled by the CommonGizmosDataPool object 2020-04-07 16:35:52 +02:00
Lukas Matena 7c4071c541 Disabled the SLA gizmos 2020-04-07 16:35:52 +02:00
Lukas Matena 8475968025 First installation of common gizmo data pool 2020-04-07 16:35:52 +02:00
Lukas Matena 0054134ff8 Fix of #3916 (macOS crash when generating WarningTexture)
Likely the same cause as #3371, hopefully the same solution as presented in 4f1f507
2020-03-25 23:55:25 +01:00
Lukas Matena ece0d4ca18 Merge branch 'dev' 2020-03-24 21:51:33 +01:00
Lukas Matena 97b9de47b4 Merge branch 'master' into dev 2020-03-24 21:51:05 +01:00
Lukas Matena 6d23c08d00 WIP 2020-03-19 12:04:05 +01:00
Lukas Matena f275461354 WIP: FDM supports gizmo now works with multiple part objects into some extent 2020-03-19 11:15:17 +01:00
Lukas Matena 1b05ecae8c WIP: FDM gizmo: triangles not facing the camera are no more selected with fdm selection tool 2020-03-19 11:15:17 +01:00
Lukas Matena 590569e8f6 WIP: Optimized the triangle selection so it does not iterate over all the triangles 2020-03-19 11:15:17 +01:00
Lukas Matena 2e71dcefc3 WIP: Added a circle cursor and naive logic to select triangles inside
Deselection is possible when holding shift
Triangles obscured by the mesh are selected nonetheless (so far)
2020-03-19 11:15:17 +01:00
Lukas Matena 08daddb5de WIP: First working implementation of the triangle selector for the FDM support gizmo 2020-03-19 11:15:17 +01:00
Lukas Matena 7afe7326b6 WIP: Duplicated the SLA gizmo for the FDM, removed what was not needed
Clipping plane and the m_model_object pointer keeping was duplicated
2020-03-19 11:15:17 +01:00
Lukas Matena 37be82c8aa Tooltips are rendered unformatted so percent signs in them do not break rendering 2020-03-18 13:50:08 +01:00
Lukas Matena c731f04331 Follow-up of previous commit - check that gizmos are enabled
To be on the safe side, reinstate one part of
the check that the previous code did.
2020-03-14 09:46:48 +01:00
Lukas Matena ac103f334c Actual fix of the rare crash recently mentioned in e547a0c
The problem was in fact elsewhere. After an object is added, it is necessary to
update the gizmos. GLGizmoManager::update_data needs to be called, but regardless
of whether any gizmo is currently opened (which is what is_running returns).

To reproduce the crash that this fixes: add an object, delete it, add another one,
open SLA gizmo -> crash
2020-03-14 09:18:49 +01:00
Lukas Matena e547a0c3d1 Fix of a rare crash on opening an SLA gizmo (supports or hollow) 2020-03-13 15:58:59 +01:00
Lukas Matena a6a77361ba Multimaterial purging lines fixed on rectangular beds with non-standard origin (#3805) 2020-03-11 16:10:51 +01:00
Lukas Matena a48a79603c Multimaterial purging lines fixed on rectangular beds with non-standard origin (#3805) 2020-03-10 15:31:53 +01:00
Lukas Matena e22cc58397 Copyright year incremented (AboutDialog, manifests) 2020-03-06 16:06:21 +01:00
Lukas Matena 9453c644dd Fixed encoding in error messages sent from the backend 2020-03-06 16:06:21 +01:00
Lukas Matena 85bf78f7e7 Fix of #3765 - relaxed empty layer detection 2020-03-05 15:27:00 +01:00
Lukas Matena 0869a63eaf Fix of #3769 - wipe into infill 2020-03-05 15:26:52 +01:00
Lukas Matena ca55e8e6df Fix of #3775 - wrong background color in ErrorDialog on macOS Sierra 2020-03-05 13:21:26 +01:00
Lukas Matena 8137f7c4d4 Added a missing include 2020-03-05 12:00:23 +01:00
Lukas Matena eb3b65d8af Fixing build against wxWidgets 3.0
The wxString saga continues. wxWidgets 3.0 don't have the wxString::FromUTF8(const std::string&) overload, we must use the GUI::from_u8 helper
Also wxWidgets 3.0 don't allow to disable wxString->const char* conversion, so calling show_info(wxWindow*, wxString, const char*) was ambiguous
Several includes moved around
2020-03-04 10:34:59 +01:00
Lukas Matena 27595de1aa Merge branch 'lm_warnings' into dev 2020-03-03 16:17:55 +01:00
Lukas Matena 7589e4ebfc Fixed some more warnings 2020-03-03 15:53:26 +01:00
Lukas Matena 6918f11100 Removed SLA unused code
Mostly the dead-ends that were tried when hollowing was being implemented
2020-03-03 15:53:26 +01:00
Lukas Matena 50ebdf5293 Include cleanup in Plater, GLCanvas3D and GLGizmosManager 2020-03-03 15:53:26 +01:00
Lukas Matena 87e77e20fa Include cleanup in several files
src/slic3r/Config/Snapshot.cpp
src/slic3r/Config/Snapshot.hpp
src/slic3r/Config/Version.cpp
src/slic3r/Config/Version.hpp
src/slic3r/GUI/2DBed.cpp
src/slic3r/GUI/3DBed.cpp
src/slic3r/GUI/3DScene.cpp
src/slic3r/GUI/3DScene.hpp
src/slic3r/GUI/AboutDialog.cpp
src/slic3r/GUI/AboutDialog.hpp
src/slic3r/GUI/AppConfig.cpp
src/slic3r/GUI/BackgroundSlicingProcess.cpp
src/slic3r/GUI/BackgroundSlicingProcess.hpp
2020-03-03 15:47:02 +01:00
Lukas Matena c70b34b6c8 Fixed several warnings
The biggest difference is changing PresetCollection::m_idx_selected from int to size_t, which fixed many warnings at once.
2020-03-03 15:47:02 +01:00
Lukas Matena f2b98bddee Fixing wxString::Format encoding mismatches (part 3) 2020-03-03 10:54:17 +01:00
Lukas Matena bcd3842183 Fixing wxString::Format encoding mismatches (part 2) 2020-03-03 10:54:17 +01:00
Lukas Matena 8b16b2c12e Fixing wxString::Format encoding mismatches (part 1) 2020-03-03 10:54:17 +01:00
Lukas Matena b95d635c4d Fixed several translated strings (fix of #3748) 2020-03-02 09:06:05 +01:00
Lukas Matena 7759eccf56 Fix of dark mode detection on macOS 10.12 and 10.13 2020-02-28 15:28:04 +01:00
Lukas Matena 03f17a13e7 Bugfix: SLA pad and supports were sometimes shown on instances that should have been hidden
The showing/hiding block cannot depend on whether the mesh was recently updated.
It would then not hide the supports and pad, which are calculated later than the hollowed mesh.
2020-02-27 17:58:27 +01:00
Lukas Matena 27f50778b2 Localization: Updated POT, new dictionaries for CZ, DE, ES, FR, IT, JA and PL 2020-02-27 15:47:15 +01:00
Lukas Matena 73ad48c135 Small fix of clipping plane positioning
If the clipping plane is moved automatically after hollowed mesh was created, move the clipping plane and fix current direction so it is not reset when user wants to move it
This is a quick solution for the 2.2.0 release. It should be later refactored as mentioned in the code.
2020-02-27 15:18:15 +01:00
Lukas Matena 08a6c86326 Slight change in clipping plane updating after hollowing finishes
The clipping plane in SLA gizmos is only moved in case that the gizmo is currently active and hollowing is actually enabled.
2020-02-27 15:18:15 +01:00
Lukas Matena 5a2da9597b Shared data for SLA gizmos have been removed from GLGizmoBase
This commit introduces no functional changes, only code-shuffling
2020-02-27 15:18:15 +01:00
Lukas Matena a3869736ba SLA gizmos can now be opened when any instance is selected
This was broken - only first instance worked
2020-02-27 15:18:15 +01:00
Lukas Matena b2b2574244 Fixed a crash when deleting an object after switching from SLA to FDM 2020-02-27 15:18:15 +01:00
Lukas Matena abca180f9f More polishing of translations 2020-02-27 14:11:20 +01:00
Lukas Matena aa8c97803c Fix of #3695
Ternary operator is given wxString and std::string, which does not work when implicit conversions between std::string and wxString are disabled
2020-02-25 15:53:01 +01:00
Lukas Matena c326b31c92 Enabled text-wrapping for tooltips in hollowing gizmo 2020-02-25 11:12:04 +01:00
Lukas Matena f475d994b3 Fixup of previous commit - actually added the translation macros 2020-02-24 15:24:12 +01:00
Lukas Matena e16786b701 Added a missing localization L mark 2020-02-24 14:54:44 +01:00
Lukas Matena 15ea6f5609 Several translation-related fixes
ConfigWizard name was missing translation macro in several places
Few typos corrected
Some string conversions fixed
Two strings were not marked for translation
2020-02-24 11:00:48 +01:00
Lukas Matena 53f1a283f3 Hollowing gizmo sliders now contain a unit where appropriate 2020-02-21 14:24:50 +01:00
Lukas Matena 676448581d Fixed a bug in hollowing gizmo - hole depth not matching slider value after selection 2020-02-21 14:23:50 +01:00
Lukas Matena 0486e412f4 Merge branch 'lm_bnavigator-fix-wxtypes'
Contains encoding fixes. Uncovered after disabling unsafe wxString conversions in wxWidgets.
2020-02-21 12:55:58 +01:00
Lukas Matena f60c117761 One more encoding problem
Uncovered after rebasing onto current master
2020-02-21 12:53:51 +01:00
Lukas Matena 91cabe5832 Fixed few more encoding issues
All uncovered after disabling unsafe wxString conversions
2020-02-21 12:53:51 +01:00
Lukas Matena 598ec04639 Hopefully a fix for #3683 (encoding in hollowing gizmo) 2020-02-21 12:53:28 +01:00
Lukas Matena 8be3d074fd Fix of wipe into object
The bug was introduced in 15eedef. lower_bound_by_predicate implementation returns first item that does not satisfy the predicate, not last item that does.
2020-02-21 10:05:33 +01:00
Lukas Matena 57c0a313a4 Fixed typo in an error message 2020-02-21 10:05:03 +01:00
Lukas Matena 74799ade14 Fixed two cases of crashes on application close
Both related to ObjectList - it was attempting to call plater after it was destroyed
Approved by @YuSanka
2020-02-21 10:02:41 +01:00
Lukas Matena bcdc8829e4 Merge branch 'lm_gizmos_aabb_calculation_rebased' (SLA gizmos polishing) 2020-02-21 09:49:39 +01:00
Lukas Matena 003a54600d Make sure that objects are correctly shown/hidden when switched 2020-02-21 09:46:40 +01:00
Lukas Matena 4c22023762 SLA gizmo clipping plane resetting
Clipping plane direction is now initialized when the plane is first moved, not when the gizmo is opened. This is how previous versions worked.
This is a minimal-effort solution before the clipping plane is refactored properly.
2020-02-21 09:46:40 +01:00
Lukas Matena 4df6a645f2 AABB trees for SLA gizmos are not calculated when the object is selected, but only after one of the gizmos is opened 2020-02-21 09:46:40 +01:00
Lukas Matena 90a8076d25 SLA support gizmo correctly hides drain holes if they are clipped by clipping plane 2020-02-20 15:04:53 +01:00
Lukas Matena b1145df566 Fixed incorrect filtering of extrusions during gcode generation
The behaviour resulted in duplicate extrusions in some cases
Fix of #3665
2020-02-18 09:52:34 +01:00
Lukas Matena 9b73ecdf02 Fixed printing order of skirt-brim intersecting extrusions (#3634) 2020-02-17 12:57:43 +01:00
Lukas Matena cd937d62b5 Make sure that filament stats in gcode are on separate lines 2020-02-14 12:50:26 +01:00
Lukas Matena f8c5855d55 Hollowing 'accuracy' and 'closing distance' are only shown in the hollowing gizmo when the respective mode is active 2020-02-13 15:55:36 +01:00
Lukas Matena 2f18101c77 Slightly changed hollowing gizmo title
'ing' forms were removed to match Cut gizmo
2020-02-13 14:22:16 +01:00
Lukas Matena 2f3b665ac5 Fixup of 6d0cf16: Export hollowed STL 2020-02-13 13:49:18 +01:00
Lukas Matena 2e62f03ba8 Small fix of 41388bd:
Interior mesh can be empty and TriangleMeshSlicer would fail in that case.
Also, recalculating shared vertices after repair should probably be done, TMS relies on it.
2020-02-11 15:25:28 +01:00
Lukas Matena 6d0cf16797 Export STL exports hollowed & drilled mesh (if it is shown) 2020-02-11 11:15:44 +01:00
Lukas Matena 79ce691d58 Don't calculate the AABB tree in FDM mode 2020-02-08 17:17:51 +01:00
Lukas Matena 6dd79d4923 Added a missing include
Suggested in #3621
2020-02-08 11:42:45 +01:00
Lukas Matena 808e45f5b3 Force backend update when hollowing gizmo is closed
Otherwise, moving holes will not invalidate the drilled mesh
One cannot do it immediately though, because that would also hide the hollowed mesh
2020-02-07 14:17:14 +01:00