Commit graph

49 commits

Author SHA1 Message Date
Arthur
5054ee8508 ENH: improve hybrid tree support
1. do not add interface for small overhangs so supports are easier to
   remove
2. calculate avoidance more accurately using real layer height
  jira: STUDIO-6285
3. hybrid nodes won't collide with lower layers
4. calculate max move more accurately
5. do not increase radius if next layer has collision
  jira: STUDIO-2296, STUDIO-7883
6. rewrite plan_layer_heights to prevent support layers overlap.
  Now the tree support layers are completely independent to object layers.
6. increase collision areas for interface. The top layers may be too
close to interface with adaptive layer heights and very small overhang angle

Change-Id: I052c3f66e68afb7663e2d70c846dd09ed7086071
(cherry picked from commit aca511caebfdeec270d4fc0ec6bbbadde77cddc9)
(cherry picked from commit f2fc996652b3b204b4e554f57afed8519feb0397)
2025-02-08 11:34:39 +08:00
Arthur
532dcae37a ENH: add rectilinear interface pattern for organic support
1. add rectilinear interface pattern for organic support
    jira: STUDIO-7181
2. add tree support optgroup

Change-Id: I94882bc34a61c6adc06b8ecbc9f2323f9b039aac
(cherry picked from commit a8142ab3f37e0bd140a31a7e635b8475f471d7e3)
(cherry picked from commit 69cf816b9431bc21ca0187c7db1148e2d2e898ab)
2025-02-08 11:34:38 +08:00
Arthur
f00bdfeca8 FIX: enforcers may not work with contour expansion
To fix this we have to expand the enforcer areas just like organic support.

jira: STUDIO-7538
Change-Id: I8e4e3fd18b0e77db9beb57347d8da895fc83f4b0
(cherry picked from commit 319b3e2247e01e545bb9e4cebea7950d875cd89a)
2025-02-08 11:34:38 +08:00
Arthur
9ee61bb3dd FIX: top z distance inaccurate if it's too large
The top z gap should be split if it's too large.
Also we use same logic for both synced and independent support layer.

jira: STUDIO-7232
github: #4191
Change-Id: Idca792e8fa51a83c2a09441ecac64d40b91d6390
(cherry picked from commit c262a7ea137db09e453c157115b3d5417a32886d)
2025-02-08 11:34:37 +08:00
Arthur
0cfa5f47fe FIX: missing support layers at raft gap
jira: none
Change-Id: I9a7f34c148ee0e228cf2e8e18c85136253f354ad
(cherry picked from commit 615751538a65cdaeb8e398dcc941971c98ec11b8)
(cherry picked from commit da7f1439ce78d92326726be961528d2755d9a6e2)
2025-02-08 11:34:36 +08:00
Arthur
fa11957c17 FIX: do not break bridges in tree support
jira: STUDIO-7424
github: #4318
Change-Id: Icccf56b129c4910f3b0a49d69871b8df1375a6d9
(cherry picked from commit 99211cde5f2114fd64e2724069540577793f889a)
(cherry picked from commit 6a130a19ef2e881a7853183123163ce67d63bc37)
2025-02-08 11:34:36 +08:00
Arthur
2332caa84c FIX: empty first layer of tree support
The raft gap layer should only exist if there are raft layers.

jira: STUDIO-7184

Change-Id: Ia4d2a5b7ddf873fb4ef16c7087648214e6bde806
(cherry picked from commit f13144d6a9c20cfbad11c6907c30b10447d8f8a3)
2025-02-08 11:34:35 +08:00
Arthur
3d70bdc3e1 FIX: top z distance incorrect with adaptive layer height
This bug causes supports difficult to remove.

Rule to remmeber:
    never decrease the top z distance, you can only increase it SLIGHTLY.

jira: STUDIO-7103, STUDIO-7001
Change-Id: I24f71cd67d182d4e2c0902f244a8ca8f4c3ee982
(cherry picked from commit 461af9e8f6f98a8e0b363436276f225183365998)
2025-02-08 11:34:35 +08:00
Arthur
36f2df3339 FIX: blockers not working for sharp tails of tree support
also change default style to tree organic

jira: STUDIO-6801
Change-Id: Iab1d8c6117139c9a7a4c1fa71de0a13bcb356dd5
(cherry picked from commit d2c4efad58f16b23bef49bd47d3b70bf322d6f55)
(cherry picked from commit cd9305e3e061b67903ed8f5cd05d0136d608ee01)
2025-02-08 11:34:34 +08:00
Arthur
6e05d9ef84 FIX: overhang interface may overlap with object
jira: STUDIO-6710
Change-Id: Ie13ec81e07326a2572d698607c03aeb793f119c8
(cherry picked from commit cc49c82793a877c2c4187e6254e4092de9285010)
(cherry picked from commit 39839e37325bd93e73ba069a2ea18cb326911c42)
2025-02-08 11:34:33 +08:00
Arthur
5a8612eb63 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)
(cherry picked from commit 734a70b493b0347870dc955021b0f7055c76f84b)
2025-02-08 11:34:33 +08:00
Arthur
2577b9b3a6 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)
(cherry picked from commit 507345deb193d895d0813fc913f00b0def7e62f9)
2025-02-08 11:34:32 +08:00
Arthur
0b671e8852 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)
(cherry picked from commit 9de69035a029374be477b74e67c96dd8235daafa)
2025-02-08 11:34:32 +08:00
Arthur
19107b5869 FIX: compiling error due to template function deduction
jira: none
Change-Id: Ib2a3f03468b7992defef3ff2298882b4435cabd1
(cherry picked from commit 9efa2ee2e2dcd4d1322afa03c7b7ce05b1d69872)
(cherry picked from commit 40a468be3df9abc35054185ce780ada20902970b)
2025-02-08 11:34:31 +08:00
Arthur
da7eea49c9 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)
(cherry picked from commit 47440f040cae70f79e430b02d44f6093208ac066)
2025-02-08 11:34:30 +08:00
Arthur
fd3ed419c2 NEW: add support_object_first_layer_gap option
jira: STUDIO-6202
github: #3521

Change-Id: I6f1ce9f5312e9482c0f5bf6ac3215861c501106c
(cherry picked from commit 83027d923a6e67fa0013e5d9f627283c68e996de)
(cherry picked from commit 29da3bc441a194d5b83ce267fe24ebf3f3811133)
2025-02-08 11:34:30 +08:00
Arthur
107551f7b4 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)
(cherry picked from commit 22056d5f7e7bef5574b53fc0453781cd365bf0e1)
2025-02-08 11:34:28 +08:00
Arthur
c199730004 FIX: tree support detect overhang inaccurate
Jira: STUDIO-3657
Change-Id: I1ef4ca3ec299b121eb467afc12acee68e0f12b39
(cherry picked from commit 36f8937ae0d0d79c7558662903fffef20b528cb8)
(cherry picked from commit a631e6cb99)
2025-02-08 11:34:27 +08:00
Arthur
715e8e1c32 FIX: improve cantilever detection of tree support
github: #3667
Change-Id: I5fd6d7d5a6e80aaa563f7d033381e6b8cb9093e0
(cherry picked from commit 3f5fdf82dcaa8636d295794a1113aab78f7327af)
(cherry picked from commit 58bba45bc2294ac80c624c0032bfa284228eaa2f)
2025-02-08 11:34:27 +08:00
Arthur
562dc76ab0 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)
(cherry picked from commit e7ffe31cb3c6b526268adb4c2349a2623b181c53)
2025-02-08 11:34:26 +08:00
Arthur
31a5f0d523 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)
(cherry picked from commit fa61ee6abdb4b04a2141b3f8ea9e2e8a789b7881)
2025-02-08 11:34:25 +08:00
Arthur
a2e5332eef FIX: z_distance_top==0 not working
jira: STUDIO-6144

Change-Id: I9ddaa237e2d71c8697a41bbbdb86f70d0b1e1452
(cherry picked from commit 38ba45e9cf7f59d2c1de658a56d8f2b109721bcd)
(cherry picked from commit 9d37a31338cf42a285b39daab84af5504e51d009)
2025-02-08 11:34:25 +08:00
Arthur
c7febad548 FIX: raft_first_layer_expansion not working with tree support
jira: STUDIO-6043
github: #3355
Change-Id: Idf2a0053026a6f232a5239c3f504191321feb6ee
(cherry picked from commit 3eb35f5b1a53990d215ae4d3527917611f5083c6)
(cherry picked from commit 0589348c3264e56b9e3a16afea95a5d44983498b)
2025-02-08 11:34:24 +08:00
Arthur
d0868d6711 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)
(cherry picked from commit 39ae64fc53abec794d740e36baaa13fd6fb35849)
2025-02-08 11:34:23 +08:00
Arthur
de24d0ac2f FIX: tree support bottom interface layers were not correct
The bottom interface layers were not right when "independent support layer height" is enabled.
This commit ensures there are always 2 bottom interface layers and the gap
is not less than specified. However, the gap may be slightly larger.

Jira: STUDIO-3842, STUDIO-2138
Github: #2127

Change-Id: Ifd8fbc4c7bc6dd92f2534fdd0179458a9e93c79a
(cherry picked from commit edcdad162e)
2025-02-08 11:34:23 +08:00
Arthur
b3be5bb161 ENH: tree support uses accurate lslices
For tree support, use lslices as tree support island when generating brim,
as this is faster and more accurate.
For normal support, still use "support_fills.polygons_covered_by_spacing()" as support island when generating brim;

Jira: studio 4332

Change-Id: Ibfadd3a166606f824e5780b57112fff221470aaf
(cherry picked from commit 64960b19818c7029eaaaf3d8a89804aeaa26f11d)
(cherry picked from commit 181b05c236)
2025-02-08 11:34:22 +08:00
Noisyfox
cc9f29c463 Rename smsOrganic to smsTreeOrganic 2025-02-08 11:34:22 +08:00
Arthur
1c498664a5 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)
(cherry picked from commit f3bd5ff87021b5c26794751a1f1da4349b603102)
2025-02-08 11:34:21 +08:00
Arthur
5f450923c9 FIX: compiling error on linux
jira: none
Change-Id: I1a4563503b5ddf74a1979cc0cee7a15b8aced904
(cherry picked from commit de52c6ca62c9f3a6314ddf5a856c1d8534329886)
(cherry picked from commit 4bd2b7f96d)
2025-02-08 11:34:18 +08:00
Arthur
14ecfac592 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)
(cherry picked from commit bf93fd02fb)
2025-02-08 11:34:18 +08:00
Arthur
8a7cc79129 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)
(cherry picked from commit 7efebe6bc6)
2025-02-08 11:34:17 +08:00
Noisyfox
5fb0e01943 ENH: improve auto-arranging objects with tree support
We decide to set brim width of all objects to MAX_BRANCH_RADIUS_FIRST_LAYER if there is an object with tree support after discussion.

Jira: MAK-2009
Change-Id: I4c4940800632c433235966b01c44ac910e33a51c

(cherry picked from commit bambulab/BambuStudio@2bd6b11505)

Co-authored-by: Arthur <arthur.tang@bambulab.com>
2025-02-08 11:34:17 +08:00
Noisyfox
70c4961df3 FIX: tree support generates floating hybrid supports
Jira: STUDIO-4763
Github: #2660

Change-Id: I13d5a1443af8bc82f0cadd177e0db3fc3db971f1

(cherry picked from commit bambulab/BambuStudio@0964b5bb0a)

Co-authored-by: Arthur <arthur.tang@bambulab.com>
2025-02-08 11:34:16 +08:00
Noisyfox
2205ad0069 FIX: improve tree support generation speed
1. Improve generation speed by removing unnecessary get_avoidance.
2. Fix a bug of hybrid support's interface (Jira: STUDIO-4878,
   STUDIO-4726, Github#2614)
3. Fix a bug of tree support pass through objects (Jira: STUDIO-4252, STUDIO-4608
STUDIO-4298)
4. Fix a bug with first layer + Arachne (Jira: STUDIO-4281, Github #2423)

Change-Id: I40978c93ab93fa6964483514dad552d73a66c710
(cherry picked from commit 2ccbbe49c74d4aab4f086e79a6f8262b7fc80f15)

(cherry picked from commit bambulab/BambuStudio@d7a4623380)

Co-authored-by: Arthur <arthur.tang@bambulab.com>
2025-02-08 11:34:15 +08:00
Noisyfox
1d1df4b0a5 ENH: improve tree support
1. add a hook inside tree branches for improved strength
2. fix the issue that interface may fly as a mess (delete the logic
  where gap nodes can skip dropping down)
3. fix the issue that base nodes may fly as a mess (smoothing should
  skip polygon nodes, see Jira:STUDIO-4403)

Change-Id: Ie9f2039813c2ca3127ed8913304cc455fec8e7ee
(cherry picked from commit 83cef5f91d49ff3d275a89ec3df8b5f0fd573f8c)

(cherry picked from commit bambulab/BambuStudio@76f876a3c6)

Co-authored-by: Arthur <arthur.tang@bambulab.com>
2025-02-08 11:34:15 +08:00
Noisyfox
51290a853d Clean up tree support code
(cherry picked from commit bambulab/BambuStudio@39ae64fc53)

Co-authored-by: Arthur <arthur.tang@bambulab.com>
2025-02-08 11:34:14 +08:00
Noisyfox
4034ffea18 Replace TreeSupport::SupportParams with SupportParameters
(cherry picked from commit bambulab/BambuStudio@39ae64fc53)

Co-authored-by: Arthur <arthur.tang@bambulab.com>
2025-02-08 11:34:14 +08:00
Noisyfox
42577feeba
Clip the organic supports outside bed (#8195)
Clip the organic supports outside bed. (SoftFever/OrcaSlicer#7922)

(cherry picked from commit bambulab/BambuStudio@2c6a6ae5f4)

Co-authored-by: Arthur <arthur.tang@bambulab.com>
Co-authored-by: SoftFever <softfeverever@gmail.com>
2025-02-07 23:18:58 +08:00
Marius Wachtler
2b95ef4e3b
Fix some errors uncovered via compiler warnings (#7954)
* fix: tray_exist_bits != tray_exist_bits comparison

* fix: title == GetTitle() == title comparison

* fix: possibly dangling reference to a temporary
```
OrcaSlicer/src/libslic3r/calib.cpp:456:17: warning: possibly dangling reference to a temporary [-Wdangling-reference]
  456 |     const auto &w         = bed_ext.size().x();
OrcaSlicer/src/libslic3r/calib.cpp:456:45: note: the temporary was destroyed at the end of the full expression ‘((Eigen::DenseCoeffsBase<Eigen::Matrix<double, 2, 1, 2>, 1>*)(& Slic3r::BoundingBoxBase<PointClass>::size() const [with PointClass = Eigen::Matrix<double, 2, 1, 2>]()))->Eigen::DenseCoeffsBase<Eigen::Matrix<double, 2, 1, 2>, 1>::x()’
  456 |     const auto &w         = bed_ext.size().x();
```

* fix: mixup of | and ||
in this case I think it actually does not change the semantics it just means that both comparison have to be evaluated.

* fix: multi-character character constants need "

OrcaSlicer/src/slic3r/GUI/MediaPlayCtrl.cpp:392: warning: multi-character character constant [-Wmultichar]
  392 |     if (auto n = tunnel.find_first_of('/_'); n != std::string::npos)
OrcaSlicer/src/slic3r/GUI/MediaPlayCtrl.cpp: In member function ‘void Slic3r::GUI::MediaPlayCtrl::Stop(const wxString&)’:
OrcaSlicer/src/slic3r/GUI/MediaPlayCtrl.cpp:392: warning: overflow in conversion from ‘int’ to ‘char’ changes value from ‘12127’ to ‘95’ [-Woverflow]

* fix: missing paranthesis - skips null check

* NFC: Remove this check it can never be false

* NFC: fix warning: statement has no effect
2025-01-08 13:06:39 +08:00
Noisyfox
ff265745c6 Update PrintObject::_generate_support_material() to match BBS 2024-09-30 14:12:30 +08:00
Noisyfox
97d1745e5a Update files related to support to match BambuStudio's project structure 2024-09-30 14:12:29 +08:00
SoftFever
b3fff4ffd5 Removed the copyright and credits in the header of each file. This information is outdated and hard to update. Orca Slicer maintains the autoher info in git history so this is not necessary. 2024-06-15 14:56:44 +08:00
SoftFever
5daecf3583 switch res for large printer 2024-05-12 23:35:41 +08:00
SoftFever
9b2c2bff1d Support larger printer sizes by using 64-bit.
SuperSlicer is referenced for some changes.

Co-authored-by: Merill <merill@free.fr>
2024-05-10 23:47:08 +08:00
Seth LaForge
e5bdc7d5bd
Fix asserts which would not compile. (#3741) 2024-01-27 10:30:29 +08:00
Ocraftyone
c4a66f36ae
Debug Improvments on Windows (#3275)
* fix assert statements

* Add ORCA_INCLUDE_DEBUG_INFO to deps cmake

adds option ORCA_INCLUDE_DEBUG_INFO to deps build script to allow an alternative for RelWithDebInfo that works on windows

* add build type option to windows script

* update .gitignore to include build*
2024-01-24 11:48:14 +00:00
Noisyfox
528fb630bc
Organic: Fix support blocker (#2595)
Expand blockers a little bit to compensate the error in facet projection
2023-11-04 02:42:30 +08:00
Noisyfox
7ef43f6849
Various support improvements and bugfixes (#2202)
* Organic supports: Added check for variable layer height, with which
Organic supports are not compatible.
Fixes prusa3d/PrusaSlicer#9528 and similar.
Check the object max Z against build volume Z in Print::validate().

Cherry-picked from prusa3d/PrusaSlicer@5b94971

* Fix crash with default tree support

* Show "support_critical_regions_only" only when using auto normal tree supports (#2195)

* Fix organic tree check

---------

Co-authored-by: Vojtech Bubnik <bubnikv@gmail.com>
2023-09-24 22:58:04 +08:00
Noisyfox
a1464735ce
Initial port of organic tree support from PrusaSlicer (#1938)
* Initial port of organic tree support from PrusaSlicer

* Port missing Organic support parameters from PrusaSlicer

* Update parameter naming

* Reorganize the `raft_first_layer_expansion` and `raft_first_layer_density` parameters as they are not only used by rafts

* Reset support style only in simple mode

* Sync latest update from PrusaSlicer & copyrights

* Fix organic tree support crash with invalid parameters

---------

Co-authored-by: Vojtech Bubnik <bubnikv@gmail.com>
2023-09-02 17:29:43 +08:00