* glcanvas: add modifiers to mouse events logging
* glcanvas: workaround for touchpad nav on Win
Releasing ALT on windows platform result in GLCanvas losing focus.
Because of this mouse movements not being processed by on_mouse() event
handler and camera rotation have not cleaned up.
Make a workaround for Windows to cleanup camera rotate state on
releasing ALT modifier.
Some portions of GCode (like BTT_TFT thumbnails) has to be CRLF in
order to work correctly. However, gcode post processor was ignoring
input line endings style emitting '\n' (LF) into post-processed output.
* pa calib: print flow value and acceleration
Print flow value and acceleration for PA pattern calibration.
This should help keep track during adaptive PA calibration.
* pa pattern: fix legent section too wide in some cases
Rework pa pattern legent generation to correctly estimate
width of the legend section.
Current flow value now has variable length which is a longest of
PA value and the acceleration for a given test.
Few examples:
1. PA value are 4 characters: 0.04
Acceleratioion 3 chars: 400
Flow value will be 4 chars long: 7.98, or 11.3
2. PA: 0.018
Accel: 1000
Flow: 12.35, or 6.345
3. PA: 0.04
Accel: 15000
Flow: 34.34, or 4.567
Rework number-to-string conversion flow to correctly round values at
given precision.
* Fix -Wsubobject-linkage warning
Having tk::spline header-only implementation included from
SmallAreaInfillFlowCompensator.hpp makes
SmallAreaInfillFlowCompensator::flowModel have separate (albeit the
same) implementation in each translation unit.
In order to fix this issue, SmallAreaInfillFlowCompensator::flowModel
converted to opaque 'pimpl'
* spline: remove anonymous namespace
Remove outer anonymous namespace from splice.h to make
forward declaration for tk::spline possible.
* fix gizmo bar wobbling
Gizmo bar is wobbling at specific application window width range.
This comes from a bar scaling calculations method:
- new scale calculated for already scaled bar
- scale stored as application settings loosing precision
Rework gizmo bar resizing code to remove feedback:
- calculate scale factor based on unscaled bar size
* rework gizmo bar scaling
Unify scaling implementation across platforms (MacOS, Win, Linux).
Now all platform scale bar setting icon size.
Toolbar scale is used for high-DPI displays scaling only.
* Add comments, reorganize changes to minimize diff
* Supress warnings on unused functions an variables
Compilation of OrcaSlicer produces 3056 warnings.
Nearly half of them related to unused functions and variables.
It is unlikely we going to clean them up since we may want to
keep code base as close to the BBS as possible
* initialize class member with correct value
* Fix memset arguments order
* Merge multiple statemensts into single
* fix -Wpessimizing-move
Linux distros started removing libwebkit2gtk-4.0 libriry from their
repos. Ubuntu Noble (24.04) is one of them.
Modify debian/ubuntu deps to install libwebkit2gtk-4.1 if
no libwebkit2gtk-4.0 available
Setting slow_down_layers to 2 or more results in wrong number of slowed
down layers.
Do not increment layer_id since bottom layer (#0) handled separately.
* preview: home/end to move to start/end step of the layer
Add HOME and END key action to preview tab which moves horizontal slider
position to a first and last position respectively
* preview: cross-layer gcode inspection
Automatically advance gcode preview to the next layer when pressing
right at the last step of the layer. Same for the first step of the
layer: pressing 'left' will switch preview to the previous layer
* gui: improve RichMessageDialog
Current implementation of RichMessageDialog creates and pushes
extra checkbox widget into button button sizer which already filled in
with wxEXPAND items. That pushes position of newly added checkbox to the
left-most position which makes it invisibe for some users.
Optimize implementation of RichMessageDialog using m_checkbox_dsa of
MessageDialog instead of creating a new one. As a result, position of
the checkbox is right below the main text section.
* e3v3se: remove jerk settings from processes
Remove jerk settings from Ender3 V3 SE processes to prevent emission of M205 into gcode.
This is due to E3 V3 SE does not use jerk, but has junction deviation
enabled instead. Those two modes are mutually exclusive according to
marlin configuration page:
https://marlinfw.org/docs/configuration/configuration.html#default-acceleration-https://marlinfw.org/docs/configuration/configuration.html#junction-deviation-
Based on M503 output, E3V3SE hase junction deviation enabled:
echo:; Advanced: B<min_segment_time_us> S<min_feedrate> T<min_travel_feedrate> J<junc_dev>
echo: M205 B20000.00 S0.00 T0.00 J0.10
"M205" emitted into gcode is useless since setting jerk settings via
"M205 Xn Yn Zn" does not have any effect on the stock V3 SE firmware.
* e3v3se: update machine retraction settings
Set retraction speed to 40 mm/s as recommended by Creality
Source: https://wiki.creality.com/en/ender-series/ender-3-v3-se/quick-start-guide/user-manual
Set retraction acceleration to 500 mm/s2 to prevent extruder clicking on retraction.
* e3v3se: update start gcode
* Set and wait for bed temperature to stabilize prior to homing.
Bed mesh calibration is done with the bed temp set to 60C.
Performing G28 with bed at room temperature will not compensate
for thermal deformation introduced by heated bed if there are any.
* Remove explicit mesh levelling enable (M420).
Creality FW auto enables M420 once homing (G28) is complete:
"M420 S1 Z10.00"
gui: fix zoom-to-mouse
Plater disappeared when zoom-to-mouse enabled and user tries to zoom
with a side view enabled (Ctrl+<3..6>).
Mouse/screen center position estimation in 3D is made by calculating
intersection of a mouse vector which comes 'through' the screen with an
XY plane. However, when screen is parallel to Z axis, intersection point
located at infinite which results in infinite camera translation vector.
This change switches mouse position estimation to use of projection
matrix like its done for camera panning.
* e3v3se: disable m73 as not supported in FW
* e3v3se: remove thumbnails
Remove thumbnails generation to not confuse users.
Currently event CrealityPrint does not generate thumbnails for the E3 V3 SE.
* e3v3se: update motion capabilities
Update motion parameters for the Ender 3 V3 SE profiles:
- max acceleration on all axis to 2500 as per product spec
- max X and Y speeds to 250 as per product spec
- max Z speed to 5 as set in factory defaults (M502, M503)
- max E speed to 40 as presented in recommended print parameters on the
product page
Product spec sheet:
https://wiki.creality.com/en/ender-series/ender-3-v3-se/quick-start-guide/user-manual
* Fix model load in debug build
Debug build exit with error on model load due to failed assertion (file
path redacted):
orca-slicer: <...>/OrcaSlicer/src/libslic3r/Model.cpp:1361: void Slic3r::ModelObject::update_min_max_z(): Assertion `! this->instances.empty()' failed.
Assertion failed due to model->ensure_on_bed() being called for object
which yet to be load from file.
Do not call ensure_on_bed() for models read from file since they may be
read with no default instance.
ensure_on_bed() called later within withing Plater::load_model_objects()
for each object added.
* Rework according to code review comment
* gui: camera navigation style option
Add camera navigation style config option as a preparation for
introduction of touchpad style navigation
* gui: touchpa-friently 3d navigation
Implement FreeCAD-inspired touchpad-friendly camera operation mode:
- Shift+move: panning
- Alt+move: rotation
Set "Camera mode" to "Touchpad" in settings menu to activate this mode.
* cache current navigation style in class member variable
Cache current navigation style on canvas focus, do not
request settings value each mouse event.
* force focuse 3d preview on preferences window close
Explicitly force focus 3D preview pane on closing preferences window.
This allows preferences be updated only once without checking current
value each input event.
Another benefit is to have 3D view in focus is that user could
immediatelly use 3d-view shortcuts like Ctrl+<1..7> without clicking to
the 3D view first.
* gui: fix media eject on linux (#4700)
Removable media is not ejected on linux platform
Make get_removable_drive_from_path() check if path is a dir or not.
Trim last component in latter case only.
* Revert unnecessary style changes