Commit Graph

3241 Commits

Author SHA1 Message Date
bubnikv
3731820c48 Optimization of the configuration layer:
The values of StaticPrintConfig derived objects were searched by a name
walking through a huge chained if.
Now they are being mapped with a std::map.
Also initialization of StaticPrintConfig classes from their ConfigOptionDef
defaults is done by maintaining a single global definition of each
StaticPrintConfig derived class, and a new instance is initialized
from this static copy.

Also the ConfigOption instances are casted using static_cast
wherever possible, and their types are verified by a virtual type() method.
This approach avoids insiginificant performance penalty of a dynamic_cast.

Also the compare and clone methods were added to ConfigOption,
and the cloning & compare work on binary values, not by serialization.
2017-10-17 16:01:18 +02:00
bubnikv
5a844c91f1 When executing G-code post-processing scripts written in perl on windows,
run the perl interpreter, which was used to run the Slic3r.
https://github.com/prusa3d/Slic3r/issues/514
2017-10-03 17:05:47 +02:00
bubnikv
84d4bf8fdb Load presets into the new C++ class. 2017-10-02 17:35:00 +02:00
bubnikv
b1e3b0cdf9 Further fixes of the previous commit. 2017-09-20 10:16:00 +02:00
bubnikv
473233019c Initial partial implementation of presets in C++. 2017-09-19 13:55:48 +02:00
bubnikv
b58756f38b A bit of refactoring and beautification. 2017-09-18 10:01:37 +02:00
bubnikv
e16f827223 Ported PrintConfigBase::_handle_legacy from Perl to C++,
merged from upstream Slic3r, thanks to @alexrj.
2017-09-18 09:56:48 +02:00
bubnikv
630b746cab Fix a lag when starting to move a platter object.
The fix is done by disabling the print out of a model statistics,
which runs the model fixing twice.
2017-09-14 09:06:14 +02:00
bubnikv
6d4ec5c989 Further fix of https://github.com/alexrj/Slic3r/issues/4085
making it safe in case wxWidgets do not report supporting multisampling,
but the OpenGL context actually does and it leaves the multi-sampling enabled.
This then may in theory lead to incorrect picking by color.
2017-09-12 10:14:24 +02:00
bubnikv
888a904c9b Workaround of
"GL_MULTISAMPLE and GL_ARRAY_BUFFER_ARB messages on failed launch"
https://github.com/alexrj/Slic3r/issues/4085

Also fixes
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=872273
2017-09-12 10:03:10 +02:00
bubnikv
a2b876e261 Fixing a crash on pressing +/- with no object active.
https://github.com/prusa3d/Slic3r/issues/467
2017-08-14 12:50:35 +02:00
bubnikv
3b54b68b59 Merged new methods for handling menus with icons,
merged "Use submenus for listing options in dropdown menu." #3905
thanks @alexrj
Adapted the "Use submenus" code to sort the menus in the same order
as they appear in the parameter tabs.
2017-08-04 16:28:01 +02:00
bubnikv
632bf56f29 merged save_window_pos / restore_window_pos from @alexrj Slic3r. 2017-08-04 15:54:12 +02:00
Alessandro Ranellucci
38e713c23c Remember object settings dialog size and position. #3943 2017-08-04 15:45:10 +02:00
bubnikv
ed46cfa19d Simplified the code base by requiring wxWidgets >= 3.0 2017-08-03 17:47:18 +02:00
bubnikv
1385018724 Unicode handling:
Removed the Perl dependencies on Encode, Encode::Locale and Unicode::Normalize.
Added dependency on boost::locale.
Added encode_path, decode_path, normalize_utf8 functions to Slic3r.xs

Slic3r.xs has been made mostly utf8 safe by using the boost::nowide library,
thanks to @alexrj for the idea.

Simplified the encode_path / decode_path stuff:
wxWidgets are unicode already, so there is no need to decode_path() from it.
Perl / win32 interfacing is non-unicode, so decode_path() is executed
on ARGV just at the beginning of the perl scripts.
2017-08-03 17:31:31 +02:00
bubnikv
31085fb1d7 Ported some ModelObject methods from Perl to C++.
Added some utility functions to TriangleMesh, thanks to @alexrj
Some porting to C++ based on work by @alexrj.
2017-08-02 16:05:18 +02:00
bubnikv
777023c7a8 Ported PrintObject::prepare_infill & combine_infill from Perl to C++. 2017-08-02 14:24:32 +02:00
bubnikv
933d5b261a Fix of a "Scale to Size" dialog, where a bed size is shown scaled. 2017-08-01 14:42:59 +02:00
bubnikv
71f99423c5 New feature: Bridging angle override through a bridge_angle config
variable. When set to zero, the usual automatic bridge detection applies.
The bridging angle override may be set at the Infill->Advanced settings,
or through a modifier mesh.
2017-07-31 16:23:52 +02:00
bubnikv
3b51f64411 Fixing https://github.com/prusa3d/Slic3r/issues/432
Slic3r GUI not starting, error when using --gui (on linux)

Implements https://github.com/prusa3d/Slic3r/issues/407
Shortcuts: Movement in 3D Space
Assignment of the camera shortcuts is clear from the menu accelerators.

Implements https://github.com/prusa3d/Slic3r/issues/406
Shortcuts: Rotate +/- 45 degrees
l/r keys rotate the object

Also changed the accelerators for adding / removing duplicates from
Ctrl++/- to plain +/-, from Ctrl-Del to plain Del,
and added an 's' key accelerator for uniform scaling.
2017-07-21 16:29:40 +02:00
bubnikv
7103fa78ff Reverted back width of the tree control on the Tab panels.
Fixes https://github.com/prusa3d/Slic3r/issues/428
2017-07-20 13:09:02 +02:00
bubnikv
afd5d9eff3 Fixed issues with undefined filament color preview values. 2017-07-20 13:02:12 +02:00
bubnikv
81823fe7df Reduced the content of Geometry.pm, removed unused Perl subroutines.
Reduced the use Slic3r::Geometry and use Slic3r::Geometry::Clipper
clauses to only reference used subroutines.
2017-07-19 10:45:39 +02:00
bubnikv
c9325338a8 Fixed "upscaled objects cannot be cut above original height"
https://github.com/prusa3d/Slic3r/issues/419
2017-07-12 23:28:11 +02:00
bubnikv
3a813aaef6 Implemented "Suggestion for Preview View Change"
https://github.com/prusa3d/Slic3r/issues/415

Use left / right keys to switch between the low / high layer scroll bars
on the 3d preview screen.
2017-07-11 18:21:25 +02:00
bubnikv
6f28818f87 Fix of
"Unicode char like for example "ł" crush app when used in profile name"
https://github.com/prusa3d/Slic3r/issues/388

The Prusa3D binary builds are missing the UTF8 libraries.
To avoid having to bundle them, the case sensitive regexes testing
file suffixes were replaced with explicit enumeration of lower / upper
case letters. While crude, it avoids triggering the UTF8 library.
2017-07-11 17:15:34 +02:00
bubnikv
32213ce679 Implements loading of multi-part objects as a bunch of STLs
for a multi-material printer.
Also only a single pop-up dialog is open when loading multiple files.
2017-07-11 13:55:55 +02:00
bubnikv
a7153c67e6 Changed layout of the Tab page to accomodate a wider profile selection
combo box.
https://github.com/prusa3d/Slic3r/issues/194
https://github.com/prusa3d/Slic3r/issues/377
2017-07-11 12:02:44 +02:00
bubnikv
774c69e3c6 Fix of "Problem with larger brim overlapping "
https://github.com/prusa3d/Slic3r/issues/373
2017-07-07 16:40:23 +02:00
bubnikv
8160db23cc Implementation of "XY size Compensation for first layer"
https://github.com/prusa3d/Slic3r/issues/190
2017-06-26 16:28:10 +02:00
bubnikv
0454cc95f9 Ported the cooling changes from @alexrj: Don't slow down the external
perimeters if not necessary, don't take the bridging time into account
when slowing down the print.

Removed Extruder & GCodeWriter Perl bindings.
Improved Extruder for constness.
Refactored GCode::m_elapsed_time to struct ElapsedTime.
2017-06-22 12:59:23 +02:00
bubnikv
f0325575c2 Slic3r has been modified to propagate the following filament specific
values to GCode generator, one per active extruder:

bed_temperature
bridge_fan_speed
cooling
disable_fan_first_layers
fan_always_on
fan_below_layer_time
first_layer_bed_temperature
max_fan_speed
min_fan_speed
min_print_speed
slowdown_below_layer_time

Now it remains to extend Slic3r to correctly apply these values.
2017-06-21 16:15:39 +02:00
bubnikv
b12e4689e8 Fix of changing the order of volumes of a multi-volume part:
The 3D preview scene was not updated properly.
2017-06-21 14:10:22 +02:00
bubnikv
7ca02bda0f Fix of a "split" function issue.
1) Load a multi-part stl
2) Rotate it by 90 degrees
3) Split it.

Before this fix, the split object jumped away from the print bed.

This sound similar to
https://github.com/prusa3d/Slic3r/issues/309
2017-06-19 14:26:19 +02:00
bubnikv
c33ed9144c Fixed the objects jumping 2017-06-19 11:47:43 +02:00
bubnikv
aa54c3402b Disable the "split" button when there is no volume selected. 2017-06-15 18:11:36 +02:00
bubnikv
b724d789fd New feature: Splitting an object into a multi-part volume. 2017-06-15 15:38:15 +02:00
bubnikv
2ac981e422 Improved error handling when importing configuration from a G-code. 2017-06-14 20:18:46 +02:00
bubnikv
93dce7a2d3 Ported config load / stored to C++, thanks @alexrj
Implemented import of config values from the G-code.
2017-06-14 17:51:14 +02:00
bubnikv
3e82eb7010 Extended the tooltpis for quick slice functions. 2017-06-14 12:52:50 +02:00
bubnikv
a73a1a3f09 Removed the DLP projector dialog as it is confusing to our customers
and we doubt anybody is using it.
2017-06-14 12:05:23 +02:00
bubnikv
82bde51c27 Removed the 'simple' mode. 2017-06-14 11:48:08 +02:00
bubnikv
fdb5ed1fcb Fix for "Crash when deleting all objects"
https://github.com/prusa3d/Slic3r/issues/193
2017-06-13 13:42:38 +02:00
bubnikv
f7831240e1 Fixed compilation on OSX 2017-06-13 12:09:49 +02:00
bubnikv
5cae4cc614 Fix of https://github.com/prusa3d/Slic3r/issues/285
Refactored Model.cpp/hpp to C++x11 loops,
simplified the mesh / bbox handling.
2017-06-13 11:35:24 +02:00
bubnikv
f408f08850 Disabled the new Slic3r version check until we have a server set up
for the Slic3r Prusa Edition.

Hopefully a fix of https://github.com/prusa3d/Slic3r/issues/258
by moving the 2D thumbnail generation to the main thread and
forcing the simple 2D convex hull for even the small objects.
2017-06-12 14:25:35 +02:00
bubnikv
02ab92ea65 Little improvements of the 3D manipulation usablility:
Limit zoom out to 3x the "scene fit" amount.
Disable wheel scrolling when the middle button is pressed.
2017-06-09 15:02:11 +02:00
bubnikv
881a5c531b Fix of the last commits:
1) FLT_MAX replaced with limits,
2) apply_config is called by the test case harness to update layer height profile.
2017-06-09 14:24:00 +02:00
bubnikv
958c6553e7 Hopefully a fix of
"Layer editing does not trigger reslicing with Background Processing enabled"
https://github.com/prusa3d/Slic3r/issues/293
2017-06-09 13:27:35 +02:00