prusa3d / PrusaSlicer

G-code generator for 3D printers (RepRap, Makerbot, Ultimaker etc.)
https://www.prusa3d.com/prusaslicer/
GNU Affero General Public License v3.0
7.65k stars 1.92k forks source link

FR: support inflation and support conform to boundary #4783

Closed Schild0r closed 3 years ago

Schild0r commented 4 years ago

One thing that always bugs me out about PrusaSlicer is support generation. I have worked with S3D and Cura as well and although PrusaSlicer has a few aces up its sleeve like support blockers/enforcers and support interface etc, support generation of Cura and S3D just works better in most cases. Why do I think they are better? They are just better in matters of removability and simpler which makes them more reliable in many cases. While you can turn off features like the interface in PrusaSlicer to make them simpler there are still missing options to make them just as simple as in the other two slicers and on that I am gonna focus here.

  1. Support inflation (as it is called by S3D) or support horizontal expansion (as in Cura) PrusaSlicer has no Option for that. It just always inflates support which often results in worse removal like some support lines that undercut the part in some way. Let me give you an example. Let's look at this part which is a business card holder and lets assume we'd have to build it in that orientation: Part You could argue that this overhanging beam on the top is well within briding territory but if you look close you will see that it is curved and you cant bridge a curve like that or it will be a straight beam the first few layers so we have to support it. If we turn the interface off which gives us a better look at what I want to show as well as making support removal easier we get this: PSsupport You can see that the supports are inflated in xy direction well beyond the actual boundaries of the surface that had to be supported. This makes support removal harder because they now not only base on the bottom beam but also in front of as well as behind it, thus enclosing the beam from both sides. Also this step the supports create results in less reliability because there now is a transition. Also look at the most left support: PSsupport_fail Here we have half a mm of a support line that just does not do anything for us because that is just from the support area expansion and also it will not be able to being built. BTW I also but a support blocker there (where the small support segment is) and that did not change anything Cura on the other hand lets us set the support inflation distance and if we set it to 0 it will give us that result: CURAsupport simple and it works and no extra lines we don't need.

Now let me explain the second thing that also plays into that a little bit.

  1. support conform to support surface boundary Currently PrusaSlicer seems to always make 90° turns when ZigZagging the support lines (see above), overshooting the actual surface (which results in the expansion) but if you look at the Cura result you will see that it not only not inflates the support but also conforms to the boundary of the supported surface (the curvature of the beam) resulting in non 90° turns within the ZigZag lines. This is necessary for the not inflated support to work because otherwise you'd get straight lines again that are being bridged from one support line to the next instead of being supported with a line of the same curvature below. Coincidently if we look a few layers lower, PrusaSlicer does exactly that, only that it conforms the inflated support to the outside boundary/curvature instead of conforming it to the inside. PSsupport_bot

Implications: support inflation alone already has a feature request but the thread (#2377) looks kinda dead and has not much explanation and no comments IMO this feature would make supporting of most models simpler and more reliable. Note though that with the support inflation distance set to zero (like in Cura) and conforming supports (like in Cura) the interface should be turned off because that probably would not work well together (building a straight line interface on curved supports the interface would be missing straight endpoints to attach to) So IMO the feature should be implemented the following way:

bubnikv commented 3 years ago

Snug supports fixed with af9c7c9. For the support expansion we have #2377

Implementing a new switch for the shape of support towers:
expanded to a grid (the old way) vs.
snug (like the upstream Slic3r, Cura or Ideamaker).

Snug supports suffered from the degeneracies when merging overhang islands
over a large number of layers when projecting the support towers down.
We borrowed the idea & a bit of code from Cura by simplifying the support
polygons by closing the concave cracks, see the smooth_outward() function
and the MutablePolygon class.