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)
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)
Previously when the overhang is a slop, it's controled by the xy
distance. Now we control it with top z distance as long as it's an
interface.
Note: Not working with Snug support, which has a different mechanism of
support interface.
Jira: STUDIO-3991
Change-Id: I1b7c4cf892b4c4ec2f3e668bd966ab0971212364
(cherry picked from commit c094b5ec83dc98dca7a8b8c0438b8f1994134db6)
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
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)
Add a new suport style "Tree Organic" from Prusa, as organic support is
faster and seems more strong in some cases. Thanks to Prusa.
Feature detection including sharp tail, small overhang, long cantilever,
are still kept.
Known issue: first layer support path may go outside build plate.
Jira: STUDIO-2358
Github: #2420
Change-Id: I4cec149bf4fa9eb733ae720ac1a7f65098e3b951
(cherry picked from commit d977bc5d3b4609f4fec0aa68152a33cacf184c4a)
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
Can't delete nodes with no children, otherwise the parent-child relations may be corrupted.
Jira: STUDIO-3737, MAK-1557
Change-Id: I1de39e182bac4a55a8739c00e59fdf7b9b5e4dfb
fix bug with zero width tree supports throwing exception.
This a PR from @scottmudge commited to OrcaSlicer.
More than the original commit, we also unify the usage of line_width and
support_extrusion_width, making things simpler.
Change-Id: I0b7a4344cbda4fdf05dfd9f8965f598ad6844429
Previously holes of enforcer_polygons was taken as contours,
which caused enforcers inside a hole were too large.
Jira: STUDIO-3877
Change-Id: If38c34e2469b822012a2ed0b082783563fe99228
Enforcers should also subtract the lower polygons to get overhang areas.
Jira: STUDIO-3692
Github: #2045
Change-Id: I70f4aaae13826efc624e9bc942d2d11e9b1df1a1
(cherry picked from commit fc3d9b24ac1eb14e259488c94fca3469f319b368)
1. We have a logic to add supports at corners for tree(auto), now I extend
it to tree(manual) also.
2. Only show support_critical_regions_only option to tree(auto).
Github: #2008
Change-Id: I161444da93464fd2ef0e0f3b40a0c5852beba351
(cherry picked from commit af4efb4aadc2a4d16de3eea881c6610955985fff)
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
If support_on_buildplate_only is enabled, and a node will fall into the object,
this node should not be a normal node.
Jira: STUDIO-3047
Change-Id: I65dc6d69d28729732907111c3b34b4d32edff806
(cherry picked from commit d04dc35d45c171e20899cb391d3b192fa123c10e)
Small overhang diameter threshold is reduced,
and use bounding box size instead of area for final decision.
Github: issue 1681
Change-Id: Iabbb49dfc47345bb609214749104c808608c4d65
1. Previously if there are multiple sharp tails in a layer, some will be
missed. To fix this, we should not skip if the current layer is already
detected as sharp tails.
2. Do not mistakenly detect sharp horns as sharp tails by only detecting
the overhang areas larger than half of the extrusion line width.
Github: #1578
Jira: STUDIO-2659
Change-Id: If7ba5c9ae547d3051551aa6fa34eb6214d01a46d
CGAL to 5.4
TBB to 2021.5
OpenVDB to 8.2
Change-Id: I08992fce104e6f56001643c3c5dbf6c3f59ffc3d
(cherry picked from commit 1571f176fc37dda1c3e889776e13fa49bba4ae42)
This is caused by the inverse-order polgyons after mirroring. Adding
a union_ before offset_ex fixes this bug.
Github: #1621
Jira: 2738
Change-Id: I885a3ca6af4e5fadb2158d913cf67525bfffa91e
(cherry picked from commit 4ea95d89e7ec058ac21218e1839cfe16b486893a)
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)
We increase the smooth iterations from 1 to 50.
Change-Id: Iba883fd67d7a9a71c92b364dcc9b76e00fc45820
(cherry picked from commit 945fba20a5629148bfd8cee47f492d42c50f9824)
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)
Previously we assume the NFP of exclude regions are rectangle, which was
not always right. Now we calculate the NFP and find a best new position
to shift.
Change-Id: I02c075603cf71dd3c9146d7ac7a6706c0f850669
(cherry picked from commit 713ebd666c90d5dcfaf89914c37d211e9a470e99)
tan(90\degrees) is too large and will make detect_overhangs very slow.
Jira: STUDIO-2620
Change-Id: I55901a6bc1b56216549f66e1a7e77c0da680997b
(cherry picked from commit e58cc8a4665808580e84107f54661447000d64f3)
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)
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)
1. Fix sharp tail detection in normal support.
The not operator in front of overlaps was missing.
2. Fix bridge removal.
After adopting Prusa's smart bridge direction detection, the bridge
angle may be pi, so our previous method (comparing angle to 0 and pi/2)
was not right. Now we simply check if the bridge direction normal vector
is aligned to x-axis or y-axis.
Change-Id: I4e1fd937e432aca97cdd374ba66a0d869794126e
(cherry picked from commit c0d82003a5e4c44345219294072c54051fc5711a)
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)
Similar to tree support, make as many steps parallel as possible.
Jira: STUDIO-2525
Change-Id: Iee310bbf6911d8d3e4262ee8ed6bd133d09670a9
(cherry picked from commit 3798f1a3ecb85bbfb81925b3702fb4384e18994d)
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)
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)
1. In small overhang detection, some sharp tail cases are missed because
the max_layer was not compared.
2. In normal support, previously the lower layer's expolys were not right,
should only keep the ones that won't vanish when extruding.
Jira: STUDIO-1977, STUDIO-2200
Change-Id: Ia09ff1ab4870b7e3c199a827932536867644c76c
(cherry picked from commit e3ba3a3114821e951d6eb00b4c95e6e63ffe00d4)
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)
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)
In generate_contact_points, the rotated_dims don't actually generate a
Point, but generate an abstract expression that holds a reference to
bounding_box_size. Unfortunately, this goes wrong because bounding_box_size
ages out instantly; GCC's Address Sanitizer complains that this is a
"stack-use-after-scope" issue.
Interestingly, the Eigen documentation says that this is a known problem
with using C++11 "auto" to generate matrices (which a Point is)! It is
buried here: https://eigen.tuxfamily.org/dox/TopicPitfalls.html
This is probably an extremely theoretical correctness improvement, and also
an extremely theoretical performance improvement. But it is an improvement
nonetheless, and, more importantly, it enables me to continue to run the
slicer with Address Sanitizer turned on to find other potential issues.
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)
Use tree support to detect if there are sharp tails and so on.
Jira: STUDIO-1898
Change-Id: I148e14ca4024849875133a646a8fdd36c265b2fb
(cherry picked from commit bc74015d45e96e409d34d611876e3a24e289e029)