Commit Graph

71 Commits

Author SHA1 Message Date
Arthur 734a70b493 FIX: tree supports may generate flying nodes
Previous parallelization has a bug where two adjacent nodes may be deleted at the same time.

jira: none
Change-Id: I99a29dae9f72aa74ed2721eea4421b15eec10732
(cherry picked from commit 91efe67d723652d3f7e4484dd3cdf31638f769a4)
2024-04-08 19:50:03 +08:00
Arthur 507345deb1 ENH: improve supporting sharp tails of tree support
1. sharp tails are supported by a sparse set of contact points which are
easier to remove than previously dense surrounding support.
   Organic tree support also has this feature, including all other smart
overhang detection techniques (small overhang and cantilever detection),
with the cost of slightly longer time to detect overhangs.
2. improve supporting overhang contours by adding contact points along
   contours.
  jira: STUDIO-3876
2. remove some redundant data structure.

Change-Id: If7f595348506a14aba2d0132d23f97d3539c1e1f
(cherry picked from commit e3cce09b9db12ced2841045ffd337b1f35494e6c)
2024-04-08 19:50:03 +08:00
Bastien Nocera c680128141 libslic3r: Fix missing BOOST_LOG_TRIVIAL declaration
FAILED: src/libslic3r/CMakeFiles/libslic3r.dir/Support/TreeSupport.cpp.o
/usr/bin/c++ -DBOOST_ATOMIC_NO_LIB -DBOOST_CHRONO_NO_LIB -DBOOST_DATE_TIME_NO_LIB -DBOOST_FILESYSTEM_NO_LIB -DBOOST_IOSTREAMS_NO_LIB -DBOOST_LOCALE_NO_LIB -DBOOST_LOG_NO_LIB -DBOOST_REGEX_NO_LIB -DBOOST_SYSTEM_NO_LIB -DBOOST_THREAD_NO_LIB -DHAVE_FREETYPE -DHAVE_OPENGL_EXT -DHAVE_XLIB -DLIBNEST2D_GEOMETRIES_libslic3r -DLIBNEST2D_OPTIMIZER_nlopt -DLIBNEST2D_STATIC -DLIBNEST2D_THREADING_tbb -DOCC_CONVERT_SIGNALS -DOPENVDB_OPENEXR_STATICLIB -DOPENVDB_STATICLIB -DSLIC3R_GUI -DTBB_USE_CAPTURED_EXCEPTION=0 -DUNICODE -DUSE_TBB -DWXINTL_NO_GETTEXT_MACRO -D_UNICODE -DwxNO_UNSAFE_WXSTRING_CONV -DwxUSE_UNICODE -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/run/build/BambuStudio/src -I/run/build/BambuStudio/build/src/platform -I/run/build/BambuStudio/src/libslic3r -I/run/build/BambuStudio/build/src/libslic3r -I/run/build/BambuStudio/deps/build/destdir/usr/local/include/opencascade -I/run/build/BambuStudio/src/libnest2d/include -I/run/build/BambuStudio/src/miniz -I/run/build/BambuStudio/src/glu-libtess/include -I/run/build/BambuStudio/src/clipper2/Clipper2Lib/include -isystem /run/build/BambuStudio/src/eigen -isystem /run/build/BambuStudio/src/libigl -isystem /run/build/BambuStudio/deps/build/destdir/usr/local/include -isystem /run/build/BambuStudio/deps/build/destdir/usr/local/include/OpenEXR -std=gnu++20 -fext-numeric-literals -Wall -Wno-reorder -O3 -DNDEBUG -std=gnu++17 -fPIC -fsigned-char -Werror=return-type -Wno-ignored-attributes -Wno-unknown-pragmas -DOPENVDB_ABI_VERSION_NUMBER=8 -MD -MT src/libslic3r/CMakeFiles/libslic3r.dir/Support/TreeSupport.cpp.o -MF src/libslic3r/CMakeFiles/libslic3r.dir/Support/TreeSupport.cpp.o.d -o src/libslic3r/CMakeFiles/libslic3r.dir/Support/TreeSupport.cpp.o -c /run/build/BambuStudio/src/libslic3r/Support/TreeSupport.cpp
/run/build/BambuStudio/src/libslic3r/Support/TreeSupport.cpp:832:39: error: ‘info’ was not declared in this scope; did you mean ‘tbb::v1::info’?
  832 |                     BOOST_LOG_TRIVIAL(info) << "detect_overhangs takes more than 30 secs, skip cantilever and sharp tails detection: layer_nr=" << layer_nr << " duration=" << duration;
      |                                       ^~~~
      |                                       tbb::v1::info
In file included from /run/build/BambuStudio/deps/build/destdir/usr/local/include/oneapi/tbb/task_arena.h:31,
                 from /run/build/BambuStudio/deps/build/destdir/usr/local/include/oneapi/tbb/partitioner.h:48,
                 from /run/build/BambuStudio/deps/build/destdir/usr/local/include/oneapi/tbb/parallel_for.h:27,
                 from /run/build/BambuStudio/deps/build/destdir/usr/local/include/tbb/parallel_for.h:17,
                 from /run/build/BambuStudio/src/libslic3r/Support/TreeSupport.cpp:25:
/run/build/BambuStudio/deps/build/destdir/usr/local/include/oneapi/tbb/info.h:125:11: note: ‘tbb::v1::info’ declared here
  125 | namespace info {
      |           ^~~~
/run/build/BambuStudio/src/libslic3r/Support/TreeSupport.cpp:832:21: error: ‘BOOST_LOG_TRIVIAL’ was not declared in this scope
  832 |                     BOOST_LOG_TRIVIAL(info) << "detect_overhangs takes more than 30 secs, skip cantilever and sharp tails detection: layer_nr=" << layer_nr << " duration=" << duration;
      |                     ^~~~~~~~~~~~~~~~~
/run/build/BambuStudio/src/libslic3r/Support/TreeSupport.cpp:884:43: error: ‘debug’ was not declared in this scope
  884 |                         BOOST_LOG_TRIVIAL(debug) << "found a cantilever cluster. layer_nr=" << layer_nr << dist_max;
      |                                           ^~~~~
2024-04-01 08:54:23 +08:00
Arthur 9de69035a0 ENH: speedup tree support generation
1. speedup detect_overhangs by skipping sharp tail and cantilever detection if there are too many overhangs.
   jira: STUDIO-3584, STUDIO-2592
2. drop_nodes with precalculation of avoidance and tbb parallel_for_each for all nodes in each layer.
   jira: STUDIO-1814, STUDIO-2381, STUDIO-2639, STUDIO-5020,
3. don't show too many progress messages

Change-Id: Ia4897089c69c235fb7cd8e5fdcf4690086048b31
(cherry picked from commit 9c08e28b5b5342dfdde2c939fc953f143a42a59b)
2024-03-25 15:29:19 +08:00
Arthur 40a468be3d FIX: compiling error due to template function deduction
jira: none
Change-Id: Ib2a3f03468b7992defef3ff2298882b4435cabd1
(cherry picked from commit 9efa2ee2e2dcd4d1322afa03c7b7ce05b1d69872)
2024-03-25 15:29:19 +08:00
Arthur 47440f040c FIX: reduce unnecessary small parts of tree supports
1. reduce unnecessary small parts of tree supports
    jira: STUDIO-6506
2. fix the bug that zero height tree support may be generated with synced support layer height.
3. fix the bug that tree nodes' radii may change abruptly
    jira: STUDIO-6326

Change-Id: I38153d136e46bf9d797881cc6ca8803767f46736
(cherry picked from commit 59af0a6c2643169463cf18010ffd75f3aa19b704)
2024-03-25 15:29:19 +08:00
Arthur 29da3bc441 NEW: add support_object_first_layer_gap option
jira: STUDIO-6202
github: #3521

Change-Id: I6f1ce9f5312e9482c0f5bf6ac3215861c501106c
(cherry picked from commit 83027d923a6e67fa0013e5d9f627283c68e996de)
2024-03-25 15:29:19 +08:00
Arthur 22056d5f7e ENH: improve the support of blade-shape overhangs
1. reduce the gap between blade-shape overhang and support
   github: #3667
2. improve sharp tail detection of blade-shape overhangs by introducing
   lslices_extrudable.
   github: #2786, #3367
   jira: STUDIO-5065, STUDIO-6038

Change-Id: I4e899eace1aa28b100a6f4ce2b8d740c317f5530
(cherry picked from commit 08328b848e39c345b6c7b64021d1e0f04df24d08)
2024-03-25 15:29:19 +08:00
Arthur 58bba45bc2 FIX: improve cantilever detection of tree support
github: #3667
Change-Id: I5fd6d7d5a6e80aaa563f7d033381e6b8cb9093e0
(cherry picked from commit 3f5fdf82dcaa8636d295794a1113aab78f7327af)
2024-03-25 15:29:19 +08:00
Arthur e7ffe31cb3 FIX: raft of tree support was incorrect
1. Raft was not generated when tree support is selected but enable_support is false.
2. Raft angle and density of tree support was incorrect

github: #3675
Change-Id: Ifd78bf619a28eb03a908e75ad56af4934b6b08b7
(cherry picked from commit 2a448095a2fb4a2abebb0a5c8082a2ddbb635f16)
2024-03-25 15:29:19 +08:00
Arthur fa61ee6abd FIX: Checking support necessity not working
Only early stop detect_overhangs if support is disabled AND not checking support necessity.

jira: STUDIO-6158
Change-Id: I2d9662231d941827d6392d57344f7d911f641e09
(cherry picked from commit b811a6031d1afe0e7b1cb73050fe6391a65411ef)
2024-03-25 15:29:19 +08:00
Arthur 9d37a31338 FIX: z_distance_top==0 not working
jira: STUDIO-6144

Change-Id: I9ddaa237e2d71c8697a41bbbdb86f70d0b1e1452
(cherry picked from commit 38ba45e9cf7f59d2c1de658a56d8f2b109721bcd)
2024-03-25 15:29:19 +08:00
Arthur 0589348c32 FIX: raft_first_layer_expansion not working with tree support
jira: STUDIO-6043
github: #3355
Change-Id: Idf2a0053026a6f232a5239c3f504191321feb6ee
(cherry picked from commit 3eb35f5b1a53990d215ae4d3527917611f5083c6)
2024-03-25 15:29:19 +08:00
Arthur 39ae64fc53 ENH: accurate top z distance for tree support
1. accurate top z distance for tree support
 Also fix a bug that bottom z and top z distances are misused.
    jira: STUDIO-3000, STUDIO-5990
    github: #1827
2. Change interface pattern to interlaced rectilinear when using
support material.
2. clean up tree support code

Change-Id: Icc8ce1b6844c841a6fbd1d623df707fdc8ed0f7b
(cherry picked from commit da7412a48dfb5767918ef125b9d0fb9718c03a61)
2024-03-25 15:29:19 +08:00
Arthur f3bd5ff870 FIX: several support bugs
1. interlaced rectilinear interface pattern not working with tree supports
2. infill overlaps with walls when wall count>1
3. support blockers can't block sharp tail detection in normal support
   jira: STUDIO-5663
4. bottom z distance=0 not working for normal support.
   jira: STUDIO-5676
   github: #3203

Change-Id: I025eff2aaad90ad565661aa656c59c82ff969bbf
(cherry picked from commit 5aaf7ead0fd697043f673161e0ede0145ec49f4d)
2024-03-25 10:42:29 +08:00
Bastien Nocera f54fb4a1cf libslic3r: Fix missing includes
Fix a lot of "undeclared" errors during compilation on top of the
current GNOME 45 Flatpak SDK.
2024-01-02 17:42:37 +08:00
Arthur d257c0f90d FIX: Revert "ENH: do not leave a gap for top...
Revert "ENH: do not leave a gap for top interface if the top z distance is 0"

This reverts commit 79ea32c7cbbdb7e689637980af7c36caf42284c9.

Revert reason: the supports are impossible to remove in some cases.
jira: STUDIO-5385

Change-Id: I376a6f4dfd78da6dfea68b9ac3d552cddd0b4272
(cherry picked from commit 34e38b705fde7f5d7f9a3a89c96a3627ce0c998e)
2023-11-30 09:51:52 +08:00
Arthur 4bd2b7f96d FIX: compiling error on linux
jira: none
Change-Id: I1a4563503b5ddf74a1979cc0cee7a15b8aced904
(cherry picked from commit de52c6ca62c9f3a6314ddf5a856c1d8534329886)
2023-11-22 08:23:38 +08:00
Arthur bf93fd02fb ENH: open support wall count for normal support
1. open support wall count for normal support
  Enabling this option makes normal support stronger and gives
  better overhang quality, but also more difficult to removal.
  Jira: STUDIO-5192
2. fix a bug where tree support (hybrid style) may get overlapped
  extrusions near the walls.
3. fix a bug where raft layers can't be 1 in tree support
  Jira: STUDIO-5261

Change-Id: Iadc0c67a9b50b5b221c8e83d5aa22ed282018cf8
(cherry picked from commit c0bb0084e386cb70ed6e16edf93190e4b38f5b90)
2023-11-22 08:23:38 +08:00
Arthur 7efebe6bc6 ENH: improve first layer tree support
First layer support can't be top interface, and
min brim width of auto mode should be larger
than 0.

Jira: STUDIO-5010
Change-Id: I02f8b017b535f8a47965387e8679f692b1966e04
(cherry picked from commit 3e7d54abe352e8ab5f9d6492b5a86a96f9067f94)
2023-11-09 10:09:10 +08:00
Arthur a006286465 FIX: organic support doesn't work with raft
Fix organic support issues by syncing with Prusa's changes. Thanks to Prusa.

Jira: none

Change-Id: I96fa1a939767bb0b0d2e8a5fd72966bb10a2042e
(cherry picked from commit 89607dc73313e1b5d389674ed2d8f4f358bcb8b9)
2023-11-09 10:09:10 +08:00