Commit Graph
100 Commits
Author SHA1 Message Date
Vojtech Bubnik 230dbb7394 Adaptive Cubic infill:
1) Fixed a wrong offset when extracting infill lines from the octree.
2) Added a variant for testing triangle in a bounding sphere
   when buildind the octree. Currently not used as the box test
   is more tight.
3) "Bridging infill" regions are now triangulated and used to densify
   the octree as well to support the bridging infill correctly.
2020-09-22 08:53:45 +02:00
Vojtech Bubnik 6cdb19971f Fixed crash in Adaptive Cubic infill if just a single line was extracted.
New function to chain lines, however not used by the Adaptive Cubic infill.
2020-09-21 11:10:57 +02:00
Vojtech Bubnik 348c654c26 Adaptive infill:
Fixing compilation on Linux,
WIP: Better chainining of infill lines.
2020-09-18 13:35:35 +02:00
Vojtech Bubnik 7e756b20e6 Adaptive infill: Reshuffled the namespaces. 2020-09-18 10:53:50 +02:00
Vojtech Bubnik 37c5fe9923 Refactoring of adaptive cubic / support cubic:
1) Octree is built directly from the triangle mesh by checking
   overlap of a triangle with an octree cell. This shall produce
   a tighter octree with less dense cells.
2) The same method is used for both the adaptive / support cubic infill,
   where for the support cubic infill the non-overhang triangles are
   ignored.
The AABB tree is no more used.
3) Optimized extraction of continuous infill lines in O(1) instead of O(n^2)
2020-09-17 18:39:28 +02:00
Vojtech Bubnik 5d8c4b4476 Fixed missing return 2020-09-14 16:27:38 +02:00
Vojtech Bubnik 1eadb6a1a9 Replaced some of Slic3r::RuntimeError exceptions with Slic3r::SlicingError.
Only Slic3r::SlicingError are now displayed by a notification, other
exceptions are shown by a pop-up dialog.
2020-09-14 18:03:22 +02:00
Vojtech Bubnik 067cde85f1 WIP Refactoring of exceptions:
1) All slicer's exceptions are now derived from Slic3r::Exception.
2) New exceptions are defined for slicing errors.
3) Exceptions are propagated to the Plater to show.
It remains to modify the slicing back-end to throw the new SlicingError
exceptions instead of std::runtime_error and to show the other exceptions
by a message dialog instead of a notification.
2020-09-14 18:03:22 +02:00
Vojtech Bubnik 6a11e7996e Merge branch 'lh_adaptive_infill' 2020-09-09 16:46:43 +02:00
Vojtech Bubnik 7b318e1698 Refactoring of adaptive cubic infill:
Don't create an octree for the infill if it is not needed.
2020-09-09 15:55:06 +02:00
Vojtech Bubnik e010d287c5 Fixed launching of new slicer instances on Windows. 2020-09-09 11:41:23 +02:00
Vojtech Bubnik ce06fc6cb7 Added networking support for SL1 Digest authorization.
Renamed login/password/authorization_type to printhost_user/printhost_password/printhost_authorization_type.
Added initialization of physical printer preset with default values.
2020-09-08 15:31:10 +02:00
Vojtech Bubnik 0a4debc98c Fix of a preceding merge 2020-09-08 14:25:10 +02:00
Vojtech Bubnik ceaa61071a Fix of the previous merge, Windows specific. 2020-09-08 14:08:03 +02:00
Vojtech Bubnik 4e4b8ff5aa Merge branch 'vb_gcodeviewer_menu' 2020-09-08 13:51:02 +02:00
Vojtech Bubnik 946f51467f WIP Standalone G-code viewer 2020-09-08 13:33:43 +02:00
Vojtech Bubnik 0fde670fd6 osx fix 2020-09-08 11:49:02 +02:00
Vojtech Bubnik 3c51581e92 Another fix 2020-09-08 11:36:00 +02:00
Vojtech Bubnik 77ba284a59 Trying to fix spawn on OSX 2020-09-08 11:22:27 +02:00
Vojtech Bubnik 663f17a0e3 Improved logging of spawning a subprocess. 2020-09-08 09:57:17 +02:00
Vojtech Bubnik d830e1c970 Run PrusaSlicer as G-code viewer based on argv[0] name on Unix systems. 2020-09-07 22:37:55 +02:00
Vojtech Bubnik f237b33515 Yet another fix on OSX. 2020-09-07 22:28:17 +02:00
Vojtech Bubnik 889f05167a Changing the binary name on OSX to PrusaSlicer. 2020-09-07 21:36:51 +02:00
Vojtech Bubnik 8622437c12 fixing symlinks 2020-09-07 18:09:51 +02:00
Vojtech Bubnik ae0e576c32 Fixing Linux build 2020-09-07 17:41:16 +02:00
Vojtech Bubnik 1221c67d7f Fix for OSX 2020-09-07 17:09:27 +02:00
Vojtech Bubnik 9473ae8fe2 Fix of previous commit, added symlinks to gcodeviewer on Linux & OSX 2020-09-07 16:56:22 +02:00
bubnikv a251d42408 Merge branch 'vb_gcodeviewer_menu' of https://github.com/Prusa3d/PrusaSlicer into vb_gcodeviewer_menu 2020-09-07 16:02:57 +02:00
bubnikv b0bedf33c0 WIP: G-code viewer menu, refactoring of starting a background process. 2020-09-07 15:59:45 +02:00
bubnikv fd4c28ed91 WIP: G-code viewer menu, refactoring of starting a background process. 2020-09-07 15:55:03 +02:00
bubnikv 08580a9b18 WIP: prusa-gcodeviewer command line wrapper to start the PrusaSlicer
in standalone G-code viewer mode.
Linux and OSX stuff will follow.
2020-09-01 16:56:12 +02:00
Vojtech Bubnik 683af51685 Replaced boost::filesystem::canonical() with boost::filesystem::absolute(),
as canonical() is broken on Windows (reparse points aka symbolic links
are not processed correctly).

Fixes
https://github.com/prusa3d/PrusaSlicer/issues/732
https://github.com/prusa3d/PrusaSlicer/issues/3956
https://github.com/prusa3d/PrusaSlicer/issues/4557
2020-09-01 14:15:37 +02:00
bubnikv 17170b81b5 Clean-up of Shiny profiler integration, so that the intrusiver profiling
can be controlled per module.
2020-08-27 12:14:49 +02:00
bubnikv 41f474a884 Fixed performance issues when adding / removing Presets into PresetCollection.
This improves application startup time by 25-33%.
2020-08-26 21:51:50 +02:00
Vojtech Bubnik 12f43736bd Fix of Support generator debugging functions after some refactoring 2020-08-12 10:51:15 +02:00
bubnikv f7ceffb46e Fixed back-end warning infrastructure: The Print / PrintObject
should have been derived from ObjectBase, not from ObjectID.
2020-07-21 15:33:36 +02:00
bubnikv ba0146746d Fix of previous commit. 2020-07-15 18:13:11 +02:00
bubnikv f64da8e6cc Update of back-end warnings:
Back-end warnings contain two new members: "current" and "message_id".
A warning is set to "not current" if its milestone is invalidated.
2020-07-15 18:03:39 +02:00
Vojtech Bubnik 746ece4c40 Support for collecting warnings from the background processing.
Multiple warnigns may be collected per Print / PrintObject milestone
and a status update is sent to the UI immediately after a warning
is issued.
2020-07-14 11:52:34 +02:00
bubnikv c10f6a622d Fixed unit tests on Windows after introduction of GMP to
boost::polygon Voronoi diagram generator by Vojtech.

Fixed Perl bindings on Windows after some "improvement" of the Windows 10
SDK headers, which fail if included from a C++ code using the
extern "C"
clause. Namely, the Windows 10 SDK include for sockets introduces C++ macros
if a "compiled with C++" symbol is provided even if included through
exetrn "C".
2020-06-27 08:44:13 +02:00
Vojtech Bubnik 81b809f2a1 Fixed broken compilation of Perl bindings. 2020-06-16 14:39:08 +02:00
Vojtech Bubnik 851ebc7991 fix of previous commit, missing include 2020-06-16 14:00:25 +02:00
Vojtech Bubnik b101a8e266 Fixes of the offset curves from Voronoi diagram.
The offset curve extractor is already quite usable,
though singular cases are still not covered yet
when the offset curve intersects or nearly intersects
a Voronoi vertex.

Removal of the PRINTF_ZU "%zu" Visual Studio printf compatibility macro.
Fixes of a contours self intersection test for collinear segments.
SVG exporter now exports white background, so that the GNOME Eye viewer is usable.
2020-06-16 13:15:48 +02:00
Vojtech Bubnik 1c95ceaeaa Reworked algorithm for Voronoi Offset curve extraction.
Now the algorithm is very different from the OpenVoronoi implementation
and hopefully it is now correct (save numerical issues, which will be
a big PITA).
2020-06-11 16:11:02 +02:00
Vojtech Bubnik 1e3290fee1 Reduced ugly copy / paste for ENABLE_OPENGL_ERROR_LOGGING 2020-06-04 15:53:58 +02:00
Vojtech Bubnik 3e0e537b7a Offset curve from a Voronoi diagram: Fixed distance calculation
to a bisector of two segments.
2020-06-04 15:34:35 +02:00
Vojtech Bubnik 6f4d24ab95 WIP: Generating offset curves with properly rounded corners from
a Voronoi diagram. Curve extraction is based on the OpenVoronoi implementation.
2020-06-04 13:50:09 +02:00
Vojtech Bubnik b8267a5f6f G-code placeholder parser - new values:
print_bed_min, print_bed_max, print_bed_size
calculated from a bounding box of bed_shape vector of points.

Also added first_layer_print_size as a size of a first layer print
bounding box.
2020-06-03 16:30:37 +02:00
Vojtech Bubnik 6529543518 WIP: first_layer_print_min/max, first_layer_print_convex_hull
placeholders for the G-code export.
2020-06-03 16:30:37 +02:00
Vojtech Bubnik 6f92538c20 BoundingBox support for Lines,
BoundingBox constructor will no more throw for empty vector of points.

GMP allowed for Vojtech's fork of boost::polygon Voronoi implementation.

Added libslic3r tests for boost::polygon Voronoi. All Voronoi issues
ever reported on the Internet are captured by the tests. Two issues
reported (the two test cases) are real issues which may influence
PrusaSlicer negatively, namely

https://github.com/boostorg/polygon/issues/43
2020-05-28 15:53:53 +02:00
Vojtech Bubnik 180742ccaa Pulling patched boost::polygon from github prusa3d/polygon. 2020-05-22 15:33:11 +02:00
Vojtech Bubnik c09d702045 Show Eigen vectorization support in system info dialog. 2020-05-22 11:36:10 +02:00
Vojtech Bubnik ac1f24e5c9 AABB: Some further polishing and a reference to an SSE implementation
of the 3D Box vs. ray intersection implementation.
2020-05-22 11:35:49 +02:00
Vojtech Bubnik 925bf1af70 Shiny profiler: Increased resolution of text output to 2 decimals 2020-05-22 09:29:21 +02:00
Vojtech Bubnik dc46589a8e AABB - triangle intersection wrapped to mimize copying into Vector3D 2020-05-22 09:29:21 +02:00
Vojtech Bubnik c64b7b2e21 Fix of the previous commit. 2020-05-22 09:29:21 +02:00
Vojtech Bubnik 7b6dff3f03 Little simplification of Point to boost::polygon bindings 2020-05-22 09:29:21 +02:00
Vojtech Bubnik 4c365ad583 Replaced many defines in libslic3r.h with constexpr,
removed some macros to support old visual studio compiler.
2020-05-22 09:29:21 +02:00
Vojtech Bubnik 99514ba42b WIP: AABBTreeIndirect - optimized ray_box_intersect_invdir() test,
sandbox for comparing the AABBTreeIndirect with libigl::AABB
2020-05-22 09:29:21 +02:00
Vojtech Bubnik 2b8f655020 WIP AABBIndirect: Documentation, polishing. 2020-05-22 09:29:21 +02:00
Vojtech Bubnik eeb9590d28 WIP: own AABBTreeIndirect, builds up the tree 4x quicker than libigl. 2020-05-22 09:29:21 +02:00
Vojtech Bubnik abf279fc44 Fixed compilation with Shiny profiler. 2020-05-22 09:29:21 +02:00
bubnikv b73e675aaa Changed the Ironing G-code preview color based on Jindra's feedback. 2020-05-06 18:28:23 +02:00
bubnikv 0940db7b2e Improvements of the monotonous infill ordering:
Calculate the initial path length and set the initial pheromone level
accordingly.
Implemented a stopping criterion to ant colony optimization.
Fixed some compilation warnings.
2020-05-06 18:28:23 +02:00
bubnikv 5980d46e4c Bumped up version number to 2.3.0-alpha0 2020-05-05 13:11:32 +02:00
bubnikv 80b684b4b7 Fuzzy matching:
1) Handle localized and English searches as equivalent.
2) Search the whole section : group : label string, still give
   precedence to just the label.
2020-05-04 21:22:56 +02:00
bubnikv 0e87226ac9 Merge branch 'master' of https://github.com/Prusa3d/PrusaSlicer 2020-05-04 16:18:32 +02:00
bubnikv 95cf8c2d30 Fuzzy matching of parameters in the search box:
Fix of https://github.com/forrestthewoods/lib_fts/issues/21 finally applied,
disabled CamelCase matching as we are not using CamelCase in Slicer parameters.
2020-05-04 16:18:20 +02:00
bubnikv 28c0880b24 ASCII folding applied over the matched string 2020-05-03 15:45:47 +02:00
bubnikv e27c6c7928 fts_fuzzy_match fixes:
Recursive fix https://github.com/forrestthewoods/lib_fts/issues/21
End of string penalty fix https://github.com/forrestthewoods/lib_fts/issues/24

Some refactoring for succintness (based on Vojtech's taste)
2020-05-03 14:14:40 +02:00
bubnikv 07ab5c31e6 WIP Fuzzy search rework.
1) fts_fuzzy_match has been extended to support wchar_t for a char
   type and uint16_t for an index type for the match indices.
2) fts_fuzzy_match has been extended to place a proper stopper character
   into the match buffer.
3) Slicer integration now uses the fuzzy match indices for highlighting.
4) Slicer integration now correctly highlights the matched word.
5) Slicer search dialog now sorts based on match AND category.

Further modifications are planned:
1) Matching in local language vs. English: Just show the English variant
   if matched in English. Don't mix the two together.
2) Matching the group or category: Continue matching the label.
3) For matches with equal match quality and category sort alphanumerically.
2020-05-01 08:57:24 +02:00
bubnikv f479b77e01 Fixed compilation warning. 2020-04-30 12:04:49 +02:00
bubnikv 18d08cc5cb Merge branch 'master' of https://github.com/Prusa3d/PrusaSlicer 2020-04-30 12:04:03 +02:00
bubnikv cc2d33f6a0 Search: Fixed returning of a pointer to temporary. 2020-04-30 12:03:49 +02:00
bubnikv 2875bc685c Fixed spelling of "sidebar" 2020-04-29 15:58:57 +02:00
bubnikv 8a82e3d5be Localization fixes. 2020-04-29 14:42:43 +02:00
bubnikv 4de4d765ee Merge branch 'master' of https://github.com/Prusa3d/PrusaSlicer 2020-04-28 19:31:18 +02:00
bubnikv ef89c73fd5 fixing a compilation issue on a buggy GCC on R-PI 2020-04-28 18:28:11 +02:00
bubnikv b8e02a5405 Fixed handling of fill_pattern field if not all patterns are allowed
for the internal infill.
2020-04-28 18:00:42 +02:00
bubnikv ec81de7553 Ironing and Monotonous infill - first working implementation. 2020-04-28 17:19:11 +02:00
bubnikv 033548a568 Introduction of Monotonous infill type. Fill no-sort only for monotonous
and ironing infills.
2020-04-25 08:15:04 +02:00
bubnikv e390ebc95c WIP: Monotonous infill 2020-04-24 09:41:48 +02:00
bubnikv 03eb5ffcd5 WIP: Reworking of FillRectilinear2 to support monotonous infill
with ant colony optimization and 3-opt flips.
2020-04-22 10:54:11 +02:00
bubnikv 10110ed307 WIP: Ironing over top surfaces. 2020-04-14 11:53:28 +02:00
Vojtech Bubnik b578b7ec87 New parameter DEP_WX_GTK3=on/off to build wxWidgets against GTK3. 2020-04-02 11:42:45 +02:00
bubnikv 31b0ae164d Optimization of the GCodeTimeEstimator to only keep a fixed number
of trapeziodal blocks around. The number is hard coded to 64,
and 3x64 blocks are flushed everytime the queue grows over 4x64 blocks.
This time estimator is slightly more close to what the firmware does, which
keeps a fixed number of blocks and it recalculates all the blocks
every time a new block is added while the oldest block is pushed out
of the queue. Therefore this optimization shall produce negligible
differences to what the previous code produced.
2020-04-01 13:42:26 +02:00
bubnikv f4cc0ce075 Fixed the new Slic3r::GUI::format_wxstr(): The arguments were not passed. 2020-04-01 13:27:12 +02:00
bubnikv 8027fc2fb2 Yet another missing include that windows compiler did not mind. 2020-04-01 10:42:10 +02:00
bubnikv 3a1bb2fece fixed missing include 2020-04-01 10:30:33 +02:00
bubnikv 22c671e593 Fixing OSX and Linux builds 2020-04-01 10:09:31 +02:00
bubnikv b843a094f6 Slic3r::format(), Slic3r::GUI::format_wxstr():
wrappers around boost::format using C++17 variadic templates,
replacing the ugly and verbose
	(boost::format("template") % arg1 % arg2).str()
syntax.
The wrappers also implictely convert input parameters including the template
from wxString to UTF8.

The new format wrapper has been applied at multiple places as a start,
also some double macros _(L()) with new single macro _L().
2020-04-01 09:49:04 +02:00
bubnikv 25d58faaad WIP: Windows specific 3Dconnexion using WM_INPUT.
This implementation works with the 3DConnexion driver (sic!)
if PrusaSlicer.xml is stored into c:\Program Files\3Dconnexion\3DxWare\3DxWinCore64\Cfg\

The implementation is inspired with Blender, see code inside WITH_INPUT_NDOF blocks.
2020-03-31 09:01:55 +02:00
bubnikv ec86d94f02 Workaround for the Prusa3D Fast (layer height 0.35mm) profile, which
collides with the maximum allowed layer height at the Printer Extruder
0.25mm.

Works around "MMU2s and supports on prusaslicer 2.2.0 issue #3919"
2020-03-27 14:15:09 +01:00
bubnikv 58192ba6c2 Win32 specific: Using SHChangeNotifyRegister to get notifications
on removable media insert / eject events.
From now on we no more poll for removable media on Windows.

Thanks @mjgtp from prusaprinters.org
See the following discussion:
https://forum.prusaprinters.org/forum/prusaslicer/prusaslicer-trying-to-access-my-floppy-disk-a

The final working code sample was taken from Chromium source code,
volume_mount_watcher_win.cc
2020-03-27 08:10:00 +01:00
bubnikv 3fdd643f49 Fix of PrusaSlicer trying to access my floppy disk (A:\)
Some customers seem to posses a floppy drive (sic!) and some floppy
drives start spinning if accessed just to check whether there is
a medium plugged in or not.

From now, the A: and B: drives are not checked anymore for removable
media. Now let's pray nobody maps an SD card or flash drive to A: or B:

Fixes
https://forum.prusaprinters.org/forum/prusaslicer/prusaslicer-trying-to-access-my-floppy-disk-a
2020-03-26 19:06:23 +01:00
bubnikv a1aee69c5a Fixed a logical error in substitution of the selected language with
the system language: System language returned by Windows for pt_BR
is pt_PT, and this language was then used incorrectly to select
the dictionary.

Now the selected language is stored into PrusaSlicer.ini and
if a substitution is to be performed to select locales (not the dictionary)
based on the system recommended locales, this substitution is being
done in runtime just before switching the locales.
Fixes PrusaSlicer 2.3.0 - Language Portuguese (Brazilian) dont work #3901

Also hopefully fixed
LANGUAGE environment variable not respected #2970
by calling
wxTranslations::Get()->GetBestTranslation()
on Unix systems as well, which reads the "LANGUAGE" environment.
2020-03-26 14:27:18 +01:00
bubnikv b3cebdb672 Fix after merge 2020-03-25 17:55:46 +01:00
bubnikv 750e704b37 Merge remote-tracking branch 'remotes/origin/et_slope_shader' 2020-03-25 16:09:04 +01:00
bubnikv 8d7f88b381 Imported error reporting when loading presets with option keys
or option values that our poor software does not understand.
This applies to configs added by some forks of slic3r, for example
slic3r++
PrusaSlicer has encountered an error: Failed loading the preset file: #3909
2020-03-25 16:04:11 +01:00
bubnikv faf8df7864 Show just a short build info at the application toolbar even on OSX. 2020-03-25 14:35:41 +01:00