Commit Graph

26 Commits

Author SHA1 Message Date
Arthur 04bfe7e405 ENH: ease removal of tree supports
Previously tree supports are harder to remove than normal
supports. We learn from normal supports and improve the gap between
object and supports.

Jira: STUDIO-3530

Change-Id: I229a7b869b334bdf4c5aba96c9450213b83457f2
2023-07-07 17:52:43 +08:00
Arthur ef109ca170 FIX: tree support may generate floating circles
Github: #1687
Change-Id: Ib762bd2f43e1a3671404a85e234c51a0f159d919
(cherry picked from commit adf84cb6e618b60eff57c66c9f4d2fc703a87cae)
2023-07-07 17:25:51 +08:00
Arthur 719f273fa2 ENH: improve smoothness of tree supports
1. Instead of smoothing top-down, now we smooth tree branches bottom-up, and do not stop at merged nodes.
2. Fix a bug where some nodes don't have child. This is critical for bottom-up smoothing.

Change-Id: Iac0fecd81dac541ca390bcf5cbdfe7fd66cfd3a2
(cherry picked from commit 536a8a4f0ef76fa0358f4b4b181c4c7e7fff8bc7)
2023-04-17 15:39:02 +08:00
Arthur 1d4a25ed20 FIX: bring back Tree Strong style
Tree Strong is too similar to Tree Slim and people don't like it.

Jira: STUDIO-2660
Github: #1579
Change-Id: I52d7e8e674f0fc332e4ab2813261ffbc4b4cfb7a
(cherry picked from commit 9eb209b4c1737d2f10b9b8bd78c9f876f3d32bce)
2023-04-17 15:39:02 +08:00
Arthur 3d710609d9 ENH: improve cantilever detection's speed and accuracy
Cantilever detection should be done layer by layer, instead of using
merged_poly of clusters.

Jira: STUDIO-2198

Change-Id: Ifea017fc4c13425a944ee80f7dedb603a8e14cc2
(cherry picked from commit 0803a439a458ffeb9c6d91e90344a5b78794a6bd)
2023-04-17 15:39:02 +08:00
Arthur 15ba872d1c ENH: only draw infill in normal nodes of hybrid support
1. Only draw infill in normal nodes of hybrid support.
  Previously when hybrid support was selected, all nodes would have
  infill including the circle nodes which don't need infill. Now we draw
  infill only when there are normal nodes.
2. Move remove_bridge after small overhang removal because the trimmed
  bridge may be detected as small overhangs.
3. Only split circle nodes in draw_circles to prevent floating circles.
4. Fix the issue where tree support infills may not be aligned,
   which is caused by the changing spacing of filler.
5. Fix a bug where lightning infill in tree support may crash.
   Note: it is still not prepared to set lightning infill as default,
   as for some models the generation time of lightning infill is still
   too long.

Change-Id: I556e5097041d09afae1e2957d4dc9914d4610149
(cherry picked from commit 4c0849a81b60cde0c3b8ca54f03f63ea7c62dcd9)
2023-04-17 15:39:02 +08:00
Arthur 0c2ba2b0a2 ENH: improve sharp detection for small regions
1. improve sharp detection for small regions.
   When the region is around 1 extrsion width, previous method may miss some sharp tails.
Now we reduce the width threshold to 0.1*extrusion_width for sharp
tails.
   When checking "nothing below", need to expand the poly a little. Example:
benchy.
2. improve is_support_necessary.
   Only popup warning for sharp tail and large cantilever (longer than 6mm).

Jira: STUDIO-2567
Change-Id: I5e977e7766b35409891d1b41e36278e3f07fa372
(cherry picked from commit c9d8a7c1c3bbd4367c7fc44408c67e5c534167f4)
2023-04-17 15:39:02 +08:00
Arthur Tang 617cb5490b ENH: tree support style default to Tree Hybrid
1. tree support style default to Tree Hybrid
2. fix an assert bug with MedialAxis::build:
    assert(polyline.width.size() == polyline.points.size() * 2 - 2)
  This is caused by the incorrect clear function of ThickPolyline.

Change-Id: I8d6507ad366d253493e2749e0cbac8d3d837ee8a
(cherry picked from commit bd31e962c11e82005944bef40b17471075e79898)
2023-04-17 15:39:02 +08:00
arthur.tang 6c489808a7 ENH: boost is_support_necessary's performance
1. Parallelize the majority of overhang detection, leaving only a small
part of sharp tail detection as sequential. This strategy makes
is_support_necessary 10 times faster.
2. Use the overlaps function to detect overlapping, instead of using
intersection().empty()
3. Control the max recursion depth to prevent crashing due to too deep
recursion.

Jira: STUDIO-2445, STUDIO-2458
Change-Id: I35283da3e4a22d7afe251b804ce30b90a9d754df
(cherry picked from commit 1a6fedd1a0c82906f1807234ea1b816247ca6fd7)
2023-04-17 15:39:02 +08:00
Arthur bf8f163b5a ENH: improve tree support and fix a bug
1. use tree slim's merge strategy in hybrid support
2. do not break bridge in hybrid support
3. fix "support on buildplate only" not working. The cause is: with
   independent support layer height, contact_nodes are not synced with
   object layers, so the previous way of accessing contact nodes in
   unsupported_branch_leaves no longer works. To fix that, we add
   obj_layer_nr.
   Jira: STUDIO-2250

Change-Id: Idfc9b0bb10425de6414f7eae2cf5467cedf1d669
(cherry picked from commit 8780d5a7e92e298cbbccbb3bd1825197d387a340)
2023-02-22 20:09:17 +08:00
Arthur 63222d50de FIX: unsupported cantilever was not warned
1. fix unsupported cantilever was not warned. We need to set support
  type to stTreeAuto in is_support_necessary() to fully utilize the
  power of feature detection.
2. fix tree support not generated on non-first plate.

Change-Id: I5b8aa827c9d62df0119db4e8e9212f33ce75ddaa
(cherry picked from commit 60f21b6fcb45fe56f7fc867a7fcad433282bc055)
2023-02-02 16:53:45 +08:00
Arthur Tang c07dcffe16 ENH: use print volume to clip tree support
So tree supports won't go outside the bed.

Known issue:
1. moving won't trigger support re-calculating, so if you want to
  clip the supports in a different way after moving, you need to change
  the support settings (eg change threshold angle to 31 degrees).
2. clipping with the occlusion region is not complete, and an error
  message of "outside toolpath" will still be popped because we use
  convex hull to detection confliction.

Jira: STUDIO-2036

Change-Id: I643b14618eb18ffa9825072c44f677e51b0ff937
(cherry picked from commit a6217824dc0f490027e16f80f810d176dec6004b)
2023-02-01 16:24:44 +08:00
Arthur 81ee7bb99b ENH: improve is_support_necessary
Use tree support to detect if there are sharp tails and so on.

Jira: STUDIO-1898

Change-Id: I148e14ca4024849875133a646a8fdd36c265b2fb
(cherry picked from commit bc74015d45e96e409d34d611876e3a24e289e029)
2023-02-01 16:24:44 +08:00
Arthur d16dee04af ENH: [tree support] use layer_nr_next for calculate_avoidance
Previously we used layer_nr-1 as the next support layer below layer_nr,
which was not right when we used independent support layer heights.
And this would make it difficult for the tree branche to avoid the object.

Change-Id: Ic705fbd093e4bd555470646044380703ca259904
(cherry picked from commit 245e1cf4fd071b1f1fea4c5d616ff87432a76911)
2023-01-10 19:08:26 +08:00
Arthur bb48983e91 ENH: improve generate_contact_points tree support
1. Previously we used integer Point type to detect corner, which was wrong.
2. Delete duplicate points more aggressively to prevent too many points
   around curved overhangs.
3. Do not generate roof_1st_layers if there is no interface at all.

Change-Id: I1167ac04c533ec8f29dc9e656ba7072d1b54197f
(cherry picked from commit 1329347c4bf9c8207cf21e591a6ad113bb565673)
2022-12-26 05:31:54 -05:00
Arthur 58aaa94fc7 FIX: empty layers and dangling hybrid support
1. fix possible empty layers (caused by continues walls)
2. fix normal node may be absorbed in drop_nodes in "tree hybrid"
3. popup message to ask the user to select best parameters for tree strong
   and tree hybrid.
4. auto select lightning infill for tree hybrid.

Change-Id: I7d172887a9b0e4f268267684e83fc02dc7ec6a0c
(cherry picked from commit bc6d130e86c252d7fc1f84c4df7da95050dd5d51)
2022-12-26 05:31:54 -05:00
Arthur 854eb0af95 ENH: change base pattern "None" to "Hollow"
1. change base pattern "None" to "Hollow", and add an icon image
2. fix a bug of not initializing m_highest_overhang_layer
3. fix a bug where normal(auto) with Tree* styles won't generate any
   supports.
4. add popup message when selecting support material for interface.
5. draw connected loops when wall count is larger than 1

Change-Id: I7ea211d2971b25c65724bb10d0f6cf6e0b68c6a1
(cherry picked from commit 4c1ae7f937239fc3e1397ec2cb3b290d886bb0f0)
2022-12-26 05:31:54 -05:00
Arthur 29dbc77e91 NEW: add new tree support style "Tree Slim"
1. Add a new style "Tree Slim". If enabled, tree
support branches are merged more aggressively, and the support volume
is minimized.
2. Enable support style, add back Snug for normal support.
3. Remove hybrid(auto) type and use "Tree Hybrid" style to represent it.
4. Fix a bug in plan_layer_heights that may generate empty layers when
   layer height is set to 0.3mm.
5. Fix a bug where no raft is generated if there is no overhang.
6. Fix the bug where no bottom interface or bottom gap is generated when
   tree slim is selected.
7. Use physical distance to calc radius

Change-Id: Iacd57018ae5496cdc9acd28551c44d1c88c53fe0
2022-12-26 05:31:54 -05:00
MusangKing 18f794e4fa ENH: Optimize TreeSupport
New function plan_layer_heights added for pre-planning maximum layer heights

Previous adjust_layer_heights function has been commentted out.

Change-Id: I8ec5bb7b7e700ed7655d18a17d0b15de5f026592
(cherry picked from commit 55995c138e0375b8055f31768eea1392cd64168d)
2022-12-17 03:21:09 -05:00
Arthur Tang 9ca84ba948 FIX: sync with master on TreeSupport.hpp
Change-Id: I5a7eab9fcf1d46ac4a3748c66eb163fb5cc289da
2022-12-17 03:21:09 -05:00
Arthur 65766ba30a FIX: tree support crashes when there is no overhang
Default infill pattern is lightning now, which has
a crash bug when no overhang is provided.

Change-Id: I1e70b8458d1eef670a78d698c68b21d7f48bc3eb
(cherry picked from commit 777af3aa1dbb9869209945f3a6dbcc07cba0b84a)
2022-12-15 04:38:15 -05:00
Arthur 95ed039879 ENH: simplify support options and fix a tree sup bug
1. add default support base pattern (lightning for tree support,
   rectilinear for normal)
2. change default support interface pattern to "Default" (concentric for
   absoluble material, rectilinear for others)
3. delete tree_support_with_infill, replace no-infill optio with "None" infill type
4. delete HAS_LIGHTNING_INFILL macro (lightning is impossible to be
   removed now)
5. fix the issue that tree support base may grow above interface by
   adding virtual nodes (distance_to_top<0).

Change-Id: I5affa44e1f72d0dc54052927f2b315de83702870
(cherry picked from commit a2b41b1dfd9227e68ac6d971312133ec3382baa7)
2022-12-15 04:38:15 -05:00
xiang.zeng 9cf95696a4 NEW: enable lightning infill pattern for model and tree support
Change-Id: I6e2cbfdd30f8d222f88301ed0c8cc89e21cfdc24
(cherry picked from commit ddfee7c069cfc42685be509d48b8c609e1dc0cfc)
2022-10-20 19:34:37 +08:00
Arthur c9e8ef3f93 FIX: fix two tree support bugs
1. hybrid(auto) on_buildplate_only option not working correctly because
parent is not set.
2. tree(auto) on_buildplate_only not working correctly because unsupported
branch isn't deleted completely. I add child to track the dangling nodes
and then delete nodes with no child.

Change-Id: I24c69a7cf400d2961b22a720a6069cf95db6c1a5
(cherry picked from commit bce77c16128d35c668b175e7135b9fe9acd71d13)
2022-10-09 10:37:45 +08:00
lane.wei e9e4d75877 Update the codes to 01.01.00.10 for the formal release
1. first formal version of macos
2. add the bambu networking plugin install logic
3. auto compute the wipe volume when filament change
4. add the logic of wiping into support
5. refine the GUI layout and icons, improve the gui apperance in lots of
   small places
6. serveral improve to support
7. support AMS auto-mapping
8. disable lots of unstable features: such as params table, media file download, HMS
9. fix serveral kinds of bugs
10. update the document of building
11. ...
2022-07-22 20:35:34 +08:00
lane.wei 1555904bef Add the full source of BambuStudio
using version 1.0.10
2022-07-15 23:42:08 +08:00