I am designing a part with a material which can bear up to a certain stress.

To keep the stress within the design limits, I need to ensure a certain surface of solid material per layer, in other words a minimum amount of extruded filament per layer and a smoothly changing infill ratio so that the infill can transmit the load efficiently to the neighbouring layers.

The part has an irregular shape and I cannot simply increase the infill ratio for the whole object because the part is big and it would cost more time and filament. I also cannot build straight pillars of solid material inside the part because there are no regions which are suitable for a continuous pillar.

How can I calculate and apply a smoothly changing infill ratio or in general how to ensure that each layer is made of at least a certain amount of material?

I use Prusa Slicer for slicing and Fusion 360 for the design.

Related questions about variable infill, which however don't answer my question because I need to specify the amount of material and because I need a smoothly changing infill ratio:

Different infill in the same part

slic3r: Can I vary the infill percentage for different heights of my model?


2 Answers 2


Very interesting idea! There may be a way to do this semi-automatically, but I believe it's not yet a part of any slicer.

My suggestion would be:

  • Export file as .stl (Fusion 360)
  • Use a DLP slicer to create images of the layers (CHITUBox)
  • Calculate the area of each of the images (Matlab - I think?)
  • Calculate the required infill percentages for having the same mass on each layer (Excel)
  • Open the model in PrusaSlicer, create a single "height range modifier" (PrusaSlicer)
  • Save the project as .3mf (PrusaSlicer)
  • Extract the .3mf file (7 Zip)
  • Create the neccessary "layer config ranges" texts for PrusaSlicer (Excel)
  • Inject that text into an extrated .3mf file (Notepad++)
  • Pack the .3mf file again (7 Zip)
  • Slice the resulting file (PrusaSlicer)

I think you have a major XY problem. The amount of material per layer is not what determines the part strength. Unless additional material is placed in a manner that reinforces against the stress you're designing for, it's just wasted. Moreover, infill in particular is not terribly useful this way, as infill has to rest upon the support of existing infill below it. If you suddenly increase infill density at a particular layer, it will not provide any significant additional strength because the added lines will be unsupported and will not bond strongly to anything. Even the next layer above them, and the next after that for quite a few layers, will not bond well because the unsupported lines can just bend downward when the nozzle goes over them, rather than providing a surface for the newly deposited material to press firmly against and bond to.

Generally, infill is not your main source of part strength anyway. I would start out (especially if you can test; if this is a one-off thing, the material cost is not going to be an issue anyway and just go with overkill) by increasing the number of wall lines (wall thickness). Walls generally provide the most strength, and the amount of material used will be proportional to cross-sectional perimeter rather than area, which typically will vary "linearly" rather than "quadratically" (I use these terms loosely since I don't know right off how to make it rigorous - what the independent variable should be thought of as being). My usual default (and I believe Cura's) is 2 walls; I would expect 4-5 to be very strong, and as long as you keep at least 15-20% infill, probably stronger than what you'd get by any increase in infill percent.

  • $\begingroup$ My idea was to use a cubic or gyro infill, which I expected to be suited for variable changes. Hexagon is surely better for compressive forces like I have, but as you say, it is based on stacking of adjacent layers which would not be my case. I'll think more about the issues you raised. $\endgroup$
    – FarO
    Jan 6, 2020 at 15:01
  • $\begingroup$ All types of infill (and FDM deposition in general) are based on pressing adjacent layers together; it's just a matter of whether the new layer 100% coincodes with the lines of the previous one, of whether it's only partially overlapping. But wherever you have lines in the new layer that don't at least mostly overlap with ones in the previous layer, you'll have weaker structure. As a rule of thumb, you want the lines of the new layer to deviate by at most around 1/2 the extrusion line width from the lines below them. $\endgroup$ Jan 6, 2020 at 16:07
  • $\begingroup$ Then the best solution would be to do something like youtube.com/watch?v=q0YsC53mFvY where solid infill is placed along the lines of stress. $\endgroup$
    – FarO
    Jan 6, 2020 at 16:43
  • $\begingroup$ @FarO: That looks like it's using modifier meshes, which only works well if you have isolated parts that can be independently supported to use different infill for. Otherwise, I would skip slicer generation of infill entirely and instead design your model hollow with whatever infill structure you want to use. A cheap approximation of this is just putting very thin gaps inside your model (otherwise leaving it solid) wherever you want to generate walls rather than infill. $\endgroup$ Jan 6, 2020 at 17:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .