Jump to content
Ultimaker Community of 3D Printing Experts

Change infill density layer-by-layer like infill line direction


Recommended Posts

Posted · Change infill density layer-by-layer like infill line direction

Hi Ultimaker Community,

 

I would like to know if it's possible to change the infill density layer by layer. For instance infill line angle can be represented with a matrix of desired angles. If you input the following matrix [0,90] you get an infill pattern where every layer is perpendicular to the ones above and below. 

 

What I want to know if it's possible to change the infill density layer by layer. To be able to put in a matrix like [20,40] and get 20% for the first layer and then 40% for the second layer and so on.

 

Is that possible? As of now, I think I'd need to code that using CuraEngine. I am sort of a noob when it comes to programming, so I don't know how to implement that. I think I'd need to edit the infill.cpp file in the function addLineInfill or something like that. The variable that needs to be adjusted layer wise is line_distance, but I don't know how to do that.

 

Any thoughts?

 

 

 

 

  • Link to post
    Share on other sites
    Posted · Change infill density layer-by-layer like infill line direction

    Possible but a huge pain in the neck to do it.  You use the feature "per model settings".  Basic steps:

     

    1) Set the majority infill for your model (the infill that is more common).  If it's half and half then pick either 20% or 40%.

    2) Add a cube to the build plate.  Select it by clicking.  Click "per model settings" icon on left edge.  It prompts for mesh type.  You can use normal I think but definitely you can use "modify settings for infill of other models".  Set the minority infill in the settings (e.g. 20% or 40$).  Consider removing all other infill settings from the mesh type.

     

    3) Using scale tool, make the height (z scaling) equal to half your layer height.  Make the width and length (X,Y size) larger than your model.

     

    4) Now multiply this part by the number of layers you want to have the minority infill.

    5) Now select the "per model" parts one at a time.  Select the move tool on the left side, set the Z value by typing in the height for the layer to use the minority infill.  e.g. 0.7mm.  Repeat for all "per model" cuboids.

     

    If you have 50 layers this will take 25 "per model" cuboids.  Yikes.  It should work though.  Once you get good at it you should be able to do this in just 4 seconds per layer.  Not too bad if you have less than 100 layers to do.

     

    Make sure to do "save" "project" repeatedly as that will save everything including your "per model" cuboids.

     

    If you try to follow these instructions and get completely lost, google "cura per model settings" and there are great videos.

    • Like 1
    Link to post
    Share on other sites
    Posted · Change infill density layer-by-layer like infill line direction

    Thanks so much @gr5!! I did think of that because I had seen a few per model settings videos on youtube and some of the things people came up with were totally insane. That makes sense, but indeed it would be a real pain to create 50 tiny layers and set each one to a different density. 

     

    My question is really for anyone with a coding or developing background who knows how to modify the code that's working behind the scenes. Where is the density variable implemented in the code and can it be adjusted on a layer by layer basis like the angle matrix? I tried to figure that out on my own, but I'm not good enough at coding to really figure out where the variables are implemented and how.

     

    Any thoughts would be greatly appreciated.

  • Link to post
    Share on other sites
    Posted · Change infill density layer-by-layer like infill line direction
    On 10/22/2020 at 3:51 AM, gr5 said:

    Possible but a huge pain in the neck to do it.  You use the feature "per model settings".  Basic steps:

     

    1) Set the majority infill for your model (the infill that is more common).  If it's half and half then pick either 20% or 40%.

    2) Add a cube to the build plate.  Select it by clicking.  Click "per model settings" icon on left edge.  It prompts for mesh type.  You can use normal I think but definitely you can use "modify settings for infill of other models".  Set the minority infill in the settings (e.g. 20% or 40$).  Consider removing all other infill settings from the mesh type.

     

    3) Using scale tool, make the height (z scaling) equal to half your layer height.  Make the width and length (X,Y size) larger than your model.

     

    4) Now multiply this part by the number of layers you want to have the minority infill.

    5) Now select the "per model" parts one at a time.  Select the move tool on the left side, set the Z value by typing in the height for the layer to use the minority infill.  e.g. 0.7mm.  Repeat for all "per model" cuboids.

     

    If you have 50 layers this will take 25 "per model" cuboids.  Yikes.  It should work though.  Once you get good at it you should be able to do this in just 4 seconds per layer.  Not too bad if you have less than 100 layers to do.

     

    Make sure to do "save" "project" repeatedly as that will save everything including your "per model" cuboids.

     

    If you try to follow these instructions and get completely lost, google "cura per model settings" and there are great videos.

     

    yikes, is there a better example of why we need an undo function in Cura.

     

    I shudder at the thought of placing 50 of these without an undo function lol. 

  • Link to post
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
    ×
    ×
    • Create New...