Refactoring of FDM support generator:

1) If "support on build plate only" is enabled, the support columns are
   newly trimmed to not land on top of an object. However this may make
   the column too small to be stable.
2) Support enforcers newly take precedence over "supports on build plate only"
   and over "don't support bridges".
3) Some refactoring of the support generator code for clarity: Reduced
   some of the worst spagetti offenders.

Fixes Support generated even if support on build only activated #915
Fixes Bug: supports on build plate only #1340
Fixes Bottom interface layer is not generated , support on build plate only. (long open defect) #4199
Fixes option "supports on build plate only" does not work #3980

Fixes No support interface layers generated #1997
Fixes Feature Request: Option to combine results of 'support from build plate only' and 'support enforcers only' #2801
Fixes Support interface isn't generated: build plate only + blocked by model + support enforcer #3831
Fixes Support Enforcer don't create interface layers #5748
Fixes Support Enforcers Don't Have Top Loops/Raft #1870
Fixes Don't cancel support enforcers with "don't support bridges" #5105
This commit is contained in:
Vojtech Bubnik 2021-03-19 11:21:29 +01:00
parent 4602f40813
commit 9f09f03228
5 changed files with 1024 additions and 803 deletions

View file

@ -100,6 +100,7 @@ typedef std::vector<LayerRegion*> LayerRegionPtrs;
class Layer
{
public:
// Sequential index of this layer in PrintObject::m_layers, offsetted by the number of raft layers.
size_t id() const { return m_id; }
void set_id(size_t id) { m_id = id; }
PrintObject* object() { return m_object; }
@ -115,7 +116,7 @@ public:
// Collection of expolygons generated by slicing the possibly multiple meshes of the source geometry
// (with possibly differing extruder ID and slicing parameters) and merged.
// For the first layer, if the ELephant foot compensation is applied, this lslice is uncompensated, therefore
// For the first layer, if the Elephant foot compensation is applied, this lslice is uncompensated, therefore
// it includes the Elephant foot effect, thus it corresponds to the shape of the printed 1st layer.
// These lslices aka islands are chained by the shortest traverse distance and this traversal
// order will be applied by the G-code generator to the extrusions fitting into these lslices.
@ -170,7 +171,7 @@ protected:
virtual ~Layer();
private:
// sequential number of layer, 0-based
// Sequential index of layer, 0-based, offsetted by number of raft layers.
size_t m_id;
PrintObject *m_object;
LayerRegionPtrs m_regions;