-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FR] Implement gradient infill #38
Comments
The main problem with this solution : it's not possible to use it on every machine type. I have made some tests on my Ender 3 and the result is not correct. You need to have a machine with a direct drive feeder . With a bowden type extruder, it 's not possible to have sufficient precision. This is linked to the fact that the wire driving is subject to skating (if only one driving wheel) and a direct link to the stepping motor (Estep = 93). So, logically, for maximum precision of the extrusion, you need a direct drive, and a much more linear dual drive (Estep = 415) like the BMG clone, for example on a Ender 3 machine. |
I have a SV01 which comes with a Titan/v6 clone and it would probably work OK. But as it happens, I am not particularly keen to implement this anyway. |
I like this. I usually end up manually adding infill overrides at joints to make them stronger but just varying the thickness would probably work better because the infill pattern wouldn't need to change. It would be great if this could automatically get applied only where parts of a model get smaller (walls are closer) or where parts make a sharp turn (at joints, etc). |
I'm still not convinced that gradient infill is going to be much use but it's a rainy day here so I thought I would have a play. Here's a teaser screen shot... My approach has been "cheap and cheerful" inasmuch that I am not calculating how far each infill line segment is from the boundary of the part in two dimensions (let alone 3 dimensions) because that would be very slow. So it simply use the distance along each infill line to modulate the line width. As you can see from the above image, this causes long infill lines that pass near the boundary of the object to be thinner than you may want. Whether this is a real problem in practice needs to be determined. I shall probably make a build with this tomorrow. |
By this evening (UK time) there should be Linux and Windows builds that have the experimental settings for gradient infill. In the end, I implemented 4 types of gradient infill. They only differ in how they determine the distance from the infill line being drawn to the boundary: 1D - trivial and fast, it simply calculates the distance to the closest end of the current infill line. 2D - bit slower, now calculates the minimum distance to the boundary on the current layer. 2D+ - same as 2D but also looks at the distance to the build plate and to the top of the print. A good choice if the model doesn't vary in height. 3D - the full monty, calculates the min distance to the nearest wall or skin (the object boundary). Could be very slow for large models and dense infill. There's settings for specifying the min and max flows and for modifying the speed where the infill flow rate is changing. Please experiment and report back here if you have any comments. |
Oh, I forgot to say that this release also has some upstream changes that may modify profiles and config files,etc. I don't know for sure but I strongly recommend backing up all your cura config files, etc. before using this release. Personally, I put all of my cura config in a git repo and from time to time I do a snapshot so I can always get back to a working installation. I don't trust the upstream coders (much) so whenever they do anything that looks dangerous, I save my current config files so I can recover when they get trashed! |
Thanks a lot for implementing this, @smartavionics! I haven't actually printed anything yet with this feature, but I ran a few slicing experiments:
|
I've tried curved infills again and found out that they only don't work in 1D mode, probably because instead of a single line they connect lots of tiny lines so that the gradient threshold is not triggered. Works great in 2D, 2D+ and 3D modes. |
Ah yes, good point. I'd forgotten that. |
LOL, I didn't know that concentric infill existed! |
Yeah, I never use it myself, but I thought it's an interesting bug. 😄 |
Just checked, the concentric infill is implemented as polygons. So are the cross and cross3d infill types. All the other infill types are implemented as a bunch of lines and they support the gradient infill. The polygons don't and I doubt if I will implement it for them. |
Fair enough, it already works for all practical use cases that I care about. Thanks again for implementing this! 👍 |
Would be great also to get the possibility to change the infill printing speed as well as the flow for the people who don't have a direct drive (Parameter Max and Min speed) . |
|
Thanks for giving it a go. I would say that the middle and right test parts are pretty similar. If anything, the middle part shows more infill width variation than the right part. Have you tried measuring the line widths with digital calipers? |
Yes,
Settings of the Gradient Infill Script hereafter the sample code from the script |
Thanks for the measurements.
Don't understand what the first and last values are. Anyway, my next release will provide a new setting (gradient infill speed scheme) which will let you choose between what it does now (speed is modified where the infill flow is changing) and the scheme you are asking for (constant extrusion rate). Constant extrusion rate is fab as it will produce nicely modulated line widths and generally speeds up the prints for infills that have straight lines. It would probably be death for infills like gyroid as the printer would be in danger of flying apart on the fast sections. |
I still don't understand why a bowden extruder should behave as you are saying. What I think is happening in your case is simply that the extruder/hotend cannot deliver 200% at the normal infill speed. It's nothing to do with the fact that it's a bowden extruder. |
Yes you're right the main issue comes from the limitation of this type of extruder to deliver 200% at the normal infill speed, but it's not because it's a bowden extruder. It's because, on my machine with the original extruder, it is not possible to have sufficient precision. This is related to the fact of the extruder is subject to skating (only one driving wheel) and to a direct link to the stepping motor (Estep = 93). So, logically, for a maximum precision of the extrusion, you need a direct drive, and a much more linear dual drive (Estep = 415) as the BMG clone for example on the Ender 3/5. |
At the end of the day, it's probably a combination of factors that stop the extruder/hotend performing as well as we would like. Anyway, I am going to make a new build this afternoon that has the choice of speed modification algorithms and, hopefully, that will give you what you want. Stay tuned... |
New release now on dropbox 20200218, please give it a go. |
As someone as already write : Faster than the light ! |
I think I need a little bit more explanations .
|
The fast and slow schemes both modify the print speed so that throughout all of the infill, the extruder will turn at the same speed. So for both schemes, when the flow rate doubles, the speed has to halve, and so on. The fast scheme uses the normal print speed for normal flow so if that normal infill speed is 100 mm/S you will indeed get 200 mm/S where the flow is 50% and 50 mm/S where the flow is 200%. This is assuming the infill speed factor is 100%. If you modify that the speed changes will be less or more depending on whether you reduce the speed factor or increase it. Note that changing the speed factor from 100% will make the extruder rate change. The slow scheme uses the normal print speed for the lowest flow and so all other flows will make the print speed reduce. So in your example, with the slow scheme, at 50% flow the speed will be 100 mm/S, at 100% flow the speed will be 50 mm/S and at 200% flow, the speed will be 25 mm/S. That's the intention. |
Thanks for your help. I've found the settings and, oh man, is this epic! Whether this actually helps with part strength or not, it looks super cool and is just awesome to be able to do. Absolutely fantastic job implementing this! |
Good. Please let me know if you find any problems as I don't actually use this feature myself (yet). |
Just watched the cnc kitchen video and it led me down to this - did you consider stepping back and trying to solve the posed problem, rather than implementing Stephan's hack he could think off in the moment? Specifically, did you try exploring implementing a gradient over the pattern density itself, rather than the outflow rate? Should make this very useful infill strategy compatible with any printer and eliminate much of the speed complexity. Was thinking of doing the same, but have not contributed to slicer software before. Could be fun :) |
No, I haven't considered how the infill density could be modulated by the distance to the walls. Thinking about it now, the discontinuities that would be present where the infill density changes would (a) make the infill weaker and (b) make it slow to print. Sounds like a lot of work for dubious gain. |
We already have in Cura such type of Infill Pattern It's call Cubic Subdivision . But on my point of view it's not very efficient. |
I suspect that @dyordan1 is talking about varying the infill density within a single layer depending on the proximity of the nearest wall. |
Yes I think so too, but even if in the Cubic Subdivision we dont' have a notion of "Distance" it's closed to a variation of the infill density. But I don't know as it is a mathematical subdivision by 8 of each cube if it would be possible to limit this subdivision in an area limited by a distance parameter. |
Yeah, I guess I was talking about varying density within each layer based on wall proximity. As you pointed out, @smartavionics, I'm sure the discontinuities would be tough to handle, especially with certain types of infill. With that said - I do think it warrants an experiment. My gut sense is you might get OK results with rectilinear fill - the discontinuities would mesh just fine, especially if you're smart about density steps. Then, maybe ask Stephan to do some of his linear/load strength tests with the new feature and compare the results. To Stephan's point in the original video, the load on a part falls off from the skin onwards, i.e. it would follow the density curve. It would make sense the optimal point for strength vs material used will add material that roughly approximates load pattern. I kinda like Cubic subdivision but I think the rough cube shapes it ends up using are not sufficient to distribute load in a complex shape. There are also rather large holes in the infill, which puts extra load on the cube walls, in combination with sharp corners which don't distribute load too well. Varying density would not cause as big of a gap, since even the sparser parts could have some infill and could be a more complex shape that distributes load better. Btw, none of this intends to devalue your awesome work here, I'm just suggesting an alternate look at it - if I find the time to do so anytime soon, I would love to experiment myself but I'm sure I'd fumble and fall much more than one of y'all :) |
I agree that infill could be better optimised to take into account not only the proximity of walls but also the load bearing requirement of a given infill region. Currently, where I need denser infill, I use modifier meshes to alter the infill pattern and density where required, here's an example that puts dense infill around the holes for fasteners on a bracket and uses sparser gyroid infill elsewhere... |
was this removed ? can not find it in beta 4.9 |
It's still in my releases. It's not in the UM releases. |
A thing that need to be taken in account is the 3D of the shape, the infill needs to be more thick at the borders, and less in the middle. |
Based on the idea from https://www.cnckitchen.com/blog/gradient-infill-for-3d-prints and code from https://github.com/CNCKitchen/GradientInfill:
The text was updated successfully, but these errors were encountered: