Jump to content
Ultimaker Community of 3D Printing Experts

How do I set Fill Density in CuraEngine


Recommended Posts

Posted · How do I set Fill Density in CuraEngine

I'm using CuraEngine v3.1.0 on Ubuntu 18.04 to slice an stl file and using the ultimaker.def.json definitions file.  That file suggests that there is an infill setting called 'infill_sparse_density' with a default value of 20%.  When I first ran CuraEngine it generated a huge number of settings which I captured and then modified and used for subsequent slicing.  However, whatever 'infill_sparse_density' value I use the end result is always sliced with 50% infill.

 

How can I change the infill density?

 

Any suggestions would be gratefully received - thanks.

  • Link to post
    Share on other sites
    Posted · How do I set Fill Density in CuraEngine

    A have not the slightest clue how the CuraEngine works, but...

    a search for "infill_sparse_density" in CuraEngine results in zero hits. It's obviously not used at all.

    It seems like "infill_line_distance" is a better bet... 🤷‍♂️

    • Like 1
    Link to post
    Share on other sites
    Posted · How do I set Fill Density in CuraEngine

    As a general rule, only settings that don't have children in fdmprinter.def.json are actually used by CuraEngine. All the other settings are used in formulas to feed into those "final"/leaf settings. For example the infill_line_distance gets calculated from the infill_sparse_density and the infill_pattern by Cura (from a python expression) and fed to CuraEngine

    "value": "0 if infill_sparse_density == 0 else (infill_line_width * 100) / infill_sparse_density * (2 if infill_pattern == 'grid' else (3 if infill_pattern == 'triangles' or infill_pattern == 'trihexagon' or infill_pattern == 'cubic' or infill_pattern == 'cubicsubdiv' else (2 if infill_pattern == 'tetrahedral' or infill_pattern == 'quarter_cubic' else (1 if infill_pattern == 'cross' or infill_pattern == 'cross_3d' else 1))))",

     

     

    • Like 1
    Link to post
    Share on other sites
    Posted · How do I set Fill Density in CuraEngine

    And the unreadable mess above translates to:

      

    if infill_sparse_density == 0
        return 0
    else
        if infill_pattern == 'grid':
            factor = 2
        elif infill_pattern in ['triangles', 'trihexagon', 'cubic', 'cubicsubdiv']:
            factor = 3
        elif infill_pattern in ['tetrahedral', 'quarter_cubic']:
            factor = 2
        elif infill_pattern in ['cross', 'cross_3d']:
            factor = 1
        else:
            factor = 1
    
        return (infill_line_width * 100) / infill_sparse_density * factor

     

  • 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...