I'm doing research on changing the fill density into the air gap width, adjacent strand spacing, or whatever, instead of using the fill density, as it will give me more precise controls.

Question 1:

All I can work out is from Slic3r's the source code in ~/Slic3r/xs/src/libslic3r/Flow.cpp,

Link to Flow.cpp source code

/* This method returns the centerline spacing between an extrusion using this
   flow and another one using another flow.
   this->spacing(other) shall return the same value as other.spacing(*this) */

float Flow::spacing(const Flow &other) const {
   assert(this->height == other.height);
   assert(this->bridge == other.bridge);

   if (this->bridge) {
      return this->width/2 + other.width/2 + BRIDGE_EXTRA_SPACING; //Line A
   return this->spacing()/2 + other.spacing()/2;                   //Line B

If I am right, will changing Line A or Line B, be the right way to change its infill adjacent strand spacing?

Question 2:

And since we're on this topic, what does the bridge variable represent?


This answer should have been a comment, except I have included the relevant code.

To answer question 2, at a guess, bridge is simply a boolean (bool) that specifies whether there is a bridge or not.

From Flow.hpp line 32

/// Represents material flow; provides methods to predict material spacing. 
class Flow
    float width, height, nozzle_diameter;
    bool bridge;

    Flow(float _w, float _h, float _nd, bool _bridge = false)
        : width(_w), height(_h), nozzle_diameter(_nd), bridge(_bridge) {};

Additionally lines 68-73, may also be of interest:

    static float _bridge_width(float nozzle_diameter, float bridge_flow_ratio);
    /// Calculate a relatively sane extrusion width, based on height and nozzle diameter.
    /// Algorithm used does not play nice with layer heights < 0.1mm. 
    static float _auto_width(FlowRole role, float nozzle_diameter, float height);
    static float _width_from_spacing(float spacing, float nozzle_diameter, float height, bool bridge);

However, your best bet, to get an accurate answer to both of your questions, is to contact Alessandro Ranellucci - alexrj, and ask him - as he is is the designer of the Slic3r code. When you get a reply, maybe you would like to post the answer here... it may be useful for someone else.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.