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

    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
    • Our picks

      • Ultimaker Transformation Summit

        On April 20 - April 23 we will host the Ultimaker Transformation Summit. Come talk to us via Live chat and get inspired by any of our relevant presentations!
        • 6 replies
      • New here? Register your Ultimaker for free 3D printer onboarding course
        Hi,
         
        Often getting started is the most difficult part of any process. A good start sets you up for success and saves you time and energy that could be spent elsewhere. That is why we have a onboarding course ready for
        Ultimaker S5 Pro Bundle, Ultimaker S5, Ultimaker S3 Ultimaker 2+ Connect.   
        They're ready for you on the Ultimaker Academy platform. All you need to do to gain access is to register your product to gain free access. 
        Ready? Register your product here in just 60 seconds.
          • Like
        • 0 replies
    ×
    ×
    • Create New...