supermerill / SuperSlicer

G-code generator for 3D printers (Prusa, Voron, Creality, etc.)
4.1k stars 517 forks source link

Feature Request: Slic3r's Improved 3D Honeycomb Fill #506

Open unicornswag opened 3 years ago

unicornswag commented 3 years ago

In early 2018, Slic3r's 3D honeycomb infill pattern was updated to only alternate the print direction after the current layer of cells is completed, as opposed to changing direction every layer. This results in a huge increase in compression strength with low fill densities, since now only a small fraction of the toolpaths are bridges.

https://github.com/slic3r/Slic3r/commit/54fe2e4145a75fc7e4dddf24986fd6727ea06283

I made a little write-up on the advantages here. The improvement in compression strength is really dramatic, so I think it would be awesome to see this style of 3D honeycomb in SuperSlicer, alongside the standard 3D honeycomb.

supermerill commented 3 years ago

I'll see if i can't make it works better flow-wise with the old algorithm.

unicornswag commented 3 years ago

I honestly don't see any real advantage in the current PrusaSlicer / SuperSlicer implementation of 3D honeycomb. In my testing, the Slic3r version produces much stronger parts in every direction. It's also a more "open-cell" design, so there's the possibility of using a filler material, such as expanding foam or plaster, to fill the cells after printing.

supermerill commented 3 years ago

For open cell, the gyroid is here. Indeed, the updated pattern looks like a sub optimal gyroid. With cubic and gyroid here, the 3dhoneycomp doesn't have any advantage that i can think of. The last use may be for art, and the enclosed cell looks better imho.

unicornswag commented 3 years ago

I've been testing gyroid alongside 3D honeycomb recently, and Slic3r's updated 3D honeycomb is far stronger than gyroid at the same density. I've been building test parts between 2.5% and 5% fill density, and it's astonishing how much stronger the 3D honeycomb parts are. I think the main issue with gyroid is that the intersections between layers of cells form acute angles between toolpaths that easily split apart when loaded in compression in the X- or Y-axes. Slic3r's 3D honeycomb really does have a practical advantage in large, sparse-filled parts. screen gyroid

supermerill commented 3 years ago

Yes, from cnckitchen test, gyroid is more isotropic, and others like triangles are more strong in z. If tou don't want an isotropic infill, my choice is star.

unicornswag commented 3 years ago

I don't think CNCKitchen ever tested gyroid against Slic3r's updated 3D honeycomb, but rather the PrusaSlicer version.

A major downside of cubic and stars is that, for a given density, they produce relatively large cells that need to be bridged over by the top solid layers. At the same density, the cells can often be twice as wide as with 3D honeycomb.

supermerill commented 3 years ago

Be careful with the density setting, it's not really cimparabke from infill to infill. I tried to tune gyroid initially, but even this may have diverge a bit over changes.

Fot he cell size problem, there is a denser infill setting to solve that. And Rectilinear should produce the tinyest cells and be one of the strongest in z.

unicornswag commented 3 years ago

Yes, I generally don't use the "fill density" parameter as an actual metric. Rather, I'll slice a part and look at the actual length of filament used.

Rectilinear has decent compression strength in the Z, but extremely low tensile strength, since every toolpath is a bridge, with only one point of contact at each intersection.

supermerill commented 3 years ago

How do you test for tensile test? All my tensile test show that perimeters are the significant factor, not infill.

unicornswag commented 3 years ago

I just tested them by building blocks of infill with zero perimeters, and pulling the layers apart by hand. Perimeters usually provide most of the tensile strength on small parts, but that's not always the case for large parts with huge internal volumes of infill. For example, I'm making a large part that has a large flat surface on the bottom. Various points on that surface will be loaded in tension. Some of the points are far from any perimeters, so I'm mainly relying on the tensile strength of the infill. Of course I could add solid internal features near those stress points, but it would be great if the infill could take some of the stress.

unicornswag commented 3 years ago

If I wanted to compile a custom version of SuperSlicer with Slic3r's infill styles, could I just replace all of the files in the "fill" folder with those from the current release of Slic3r?

supermerill commented 3 years ago

No, it won't work. You can try to replace just 3Dhoneycomb.cpp but even this has very little chance to work as-is. And you'll lost the "connect infill" bit.

You can play with fill_angle_increment. If you put 90 in it, it should remove the zig-zag of the pattern. For better bonding, you can also increase the sparse infill extrusion width (equivalent to the sparse flow)

unicornswag commented 3 years ago

I've already maxed out the volumetric flow rate of my SuperVolcano hotend, so any increase in extrusion width will mean a decrease in print speed, not to mention additional wasted material. The beauty of Slic3r's improved 3D honeycomb is that it allows you to print extremely sparse, saving time and material on huge prints.

supermerill commented 3 years ago

Erf, fill_angle_increment doesn't works, with 3D honeycomp, I have to correct also that.

An exemple with rectilinear with same direction from start to finish (but a change of infill angle for first 2mm for the exemple). image

i'll look to add it, when i'll have the time.

gringer commented 2 years ago

@unicornswag you're right: cnckitchen's test used the old alternating-layer 3D Honeycomb for tests. I mentioned this in my comment in his YouTube video shortly after he published it. Unfortunately that was my buggy "beta" version of the truncated octahedron infill pattern, and it's the one that's stuck in PrusaSlicer and keeps getting forked and spread around the world.

My PR for PrusaSlicer fixes this, as well as the density calculation issue and a few other things, see here for more information:

https://github.com/prusa3d/PrusaSlicer/pull/6434

Update: okay, I'm going to see if I can get this into SuperSlicer

gringer commented 1 year ago

@supermerill @unicornswag because this is a fork of PrusaSlicer, and I've got an active pull request for that, github won't let me easily create another fork of SuperSlicer for a pull request here. Presumably there's some way I can do it, but I don't yet know how.

In the interim, I've attached a diff file for the changes required in the 3D Honeycomb infill code to get this working (it only touches the two 3D Honeycomb files). I've also attached the raw files, in case someone wants to just drop them in as a replacement.

Here's a summary of the changes:

Update 3D honeycomb to only alternate layer directions at squares

Includes the following additional fixes:

Here's a screenshot of the infill pattern in SuperSlicer. I manually set the filament to change colours when the infill switched direction:

3D Honeycomb Infill with improved layering and density calculations
[3DHoneycomb_flipAtSquare.diff.txt](https://github.com/supermerill/SuperSlicer/files/10111972/3DHoneycomb_flipAtSquare.diff.txt)

Hope this helps,

- David Eccles (gringer)

3DHoneycomb_flipAtSquare.diff.txt

Fill3DHoneycomb.cpp.txt Fill3DHoneycomb.hpp.txt