Commit Graph
22 Commits
Author SHA1 Message Date
Dima Buzdyk ecc16bfabf pa calib: batch mode for pa pattern (#7199)
* pa calib: batch mode option
2025-03-07 19:26:54 +08:00
Dima Buzdyk c0533eba6f Fix sticky camera rotate for touchpad navigation style on Windows (#8249)
* 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.
2025-02-01 18:02:10 +08:00
Dima Buzdyk 330ac879c1 gcode: keep line endins in post processing (#8092)
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.
2025-01-20 10:34:03 +08:00
Dima Buzdyk e315586125 do not set project filename on object import (#7973) 2025-01-08 19:38:25 +08:00
Dima Buzdyk 2e017a73cf Fix cmake warning on policy CMP0135 (#7247) 2024-11-12 00:24:54 +08:00
Dima Buzdyk 983f1a827e pa calib: print flow value and acceleration (#7178)
* 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.
2024-10-24 23:41:51 +08:00
Dima Buzdyk e6ed93f0c6 Fix -Wsubobject-linkage warning (#6243)
* 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.
2024-08-04 10:48:24 +08:00
Dima Buzdyk 9ff0e9335f fix gizmo bar wobbling (#6230)
* 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
2024-08-04 09:05:59 +08:00
Dima Buzdyk 143d8c4a8d Suppress some compiler warnings, fix few possible bugs. (#6224)
* 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
2024-08-02 22:56:23 +08:00
Dima Buzdyk aa22b7f220 build on systems with libwebkit2gtk-4.1 (#5135)
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
2024-06-29 12:15:48 +08:00
Dima Buzdyk 47ab3a050e fix url protocol integration under linux (#5535) 2024-06-04 18:32:49 +08:00
Dima Buzdyk 966c18cbad fix slow_down_layers (#5396)
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.
2024-05-24 20:00:09 +08:00
Dima Buzdyk 6369772510 Improve gcode preview navigation (#5326)
* 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
2024-05-19 22:27:25 +08:00
Dima Buzdyk 178b889c68 gui: improve RichMessageDialog (#5371)
* 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.
2024-05-18 22:31:25 +08:00
Dima Buzdyk 513335b16b e3v3se profile updates (#5339)
* 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"
2024-05-18 21:48:16 +08:00
Dima Buzdyk 5d45770745 gui: fix zoom-to-mouse (#4844)
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.
2024-04-14 17:49:44 +08:00
Dima Buzdyk 72933ebc85 Series of fixes for the Creality Ender 3 V3 SE (#4813)
* 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
2024-04-09 20:42:22 +08:00
Dima Buzdyk ff5035ffae Fix go-to-layer dialog in gcode preview (#4816)
gcode-preview: fix go-to-layer dialog
2024-04-07 22:12:28 +08:00
Dima BuzdykandSoftFever 14fc48ffbd gui: reverse mouse zoom option (#4668) (#4677)
* gui: reverse mouse zoom option (#4668)

Add configuration entry for reverse mouse zoom option
Define SUPPORT_REVERSE_MOUSE_ZOOM macro to enable feature code.

* remove SUPPORT_REVERSE_MOUSE_ZOOM macro

---------

Co-authored-by: SoftFever <softfeverever@gmail.com>
2024-04-04 21:52:07 +08:00
Dima Buzdyk ff7faca943 Fix model load in debug build (#4656)
* 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
2024-04-04 21:47:42 +08:00
Dima Buzdyk 9d81245eff Touchpad-friently 3d navigation (#4598)
* 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.
2024-04-04 21:46:14 +08:00
Dima Buzdyk 45ef4ae790 gui: fix media eject on linux (#4700) (#4701)
* 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
2024-03-29 11:12:37 +08:00