Jump to content

Alternating Layer Thickness


nebby85

Recommended Posts

Posted · Alternating Layer Thickness

Hi I'm new to the 3D world with recently purchasing an Ultimaker Original Kit

I printed out an RC car wheel rim that I designed and I was quite pleased with the outcome.

I originally printed the rim with a layer thickness of 0.25mm which took 7hours then I decided to see the quality at 0.1mm per layer which took 23hours.

I then thought about it and realised that ideally this print could be printed at 0.25mm layer thickness for most of the print where as the face of the rim, which was at the top of the print could be printed at 0.1mm or less for a good finish.

I was thinking of a plugin for Cura to change the layer heights after a certain Z value. I realise if the z values are just simply reduced or increased in the Gcode it will stretch or squash the model.

I guess if I was to reduce the layer thickness then more layers would be required which would need the X and Y values as well. increasing the layer thickness would effectively remove info and therefore possibly make a plug in work.

I haven't looked to hard for anything that already does this.

Also I'm assuming that the plugins work as a post slicing script, altering the gcode after Cura has created it. this would make any plugin going from large to small on a plugin very complex and effectively have to re-slice the model for good results.

I think the way to get a plugin like this to work is to set the thinnest layer in the normal Cura settings and then have a plugin that will look for layers between certain Z values (upper and lower) of where the thicker layers are required. ideally the thicker layer would need to be a multiple of the thinner layers in order to work well.

Ok this is going to be hard to explain... if I give a simple example it might help. say the thin layers are set to 0.1mm via Cura settings, then the plugin was set to 0.3 for the first half of the print. This would mean that Cura would slice the model into 0.1mm layers for the whole model then the plugin would need to go through and remove 2 out of every 3 layers and increase the Z values and E values to suit for the first half of the model and also renumber the layers.

this may be a bit more complicated for layers that are not quite multiples such as 0.1 and 0.25 or 0.06 and 0.1. perhaps for ease of the plugin I could get it to make subtle adjustments and get the plugin to correct the alter layer thicknesses to multiples of the original. So for the above it could be 0.1 and 0.3 (or maybe 0.2) or 0.06 and 0.12

Not sure if anyone has done this or if there is any problems that I may have over looked. please feel free to let me know what you think. Again I'm only assuming that the plugins work post slicing, I haven't looked into it too much yet.

Cheers

 

  • Link to post
    Share on other sites

    Posted · Alternating Layer Thickness

    Yes, you're right. Cura plugins are postprocessing scripts. And it may be indeed very difficult to write such a plugin. I also had planned something similar in the past. However, after having had a look at the Curaengine source code I think it should be possible to implement height dependent layer width. But not too soon.

  • Link to post
    Share on other sites

    Posted · Alternating Layer Thickness

    Plugin wouldn't be the best way to do it. This is a change that is best with the cura engine. It would also need some GUI changes, as you want to tell the slicer the resolution for certain heights.

     

  • Link to post
    Share on other sites

    Posted · Alternating Layer Thickness

    thanks for the input guys, a mod to the cura engine was my next though. potentially it would be much better and easier for people to use if done correctly. then I would not have to worry about the different layers being multiples of each other. I haven't looked at the source code yet but im going to have a look and see what I think I can do.

     

  • Link to post
    Share on other sites

    Posted · Alternating Layer Thickness

    Not a feature of Cura Pink Unicorn?

     

    that's a good point. that would be nice. although it would give me something to do if it isn't haha

    I'm looking at the python code now and I think it can be done. I will have to alter the GUI and get the slice engine to look for multiple layer thicknesses but I'm fairly confident at this stage.

    I'll update my progress as I make it.

     

  • Link to post
    Share on other sites

    Posted · Alternating Layer Thickness

    It's not planned for pink unicorn to have multiple layer heights, but everyone is free to submit a pull request.

     

  • Link to post
    Share on other sites

    Posted · Alternating Layer Thickness

    well I've done the easy bit, I've added 3 fields to the expert config dialog box.

    alternate layer thickness, lower z value and upper z value of where the change occurs.

    also added a checkbox to the BasicQuality section to toggle the alt layer expect setting on and off.

    just need to make it work... a job for another night I think!

     

  • Link to post
    Share on other sites

    Posted · Alternating Layer Thickness

    Hi Nebby85,

     

    I started Swap at Height plugin and it does support layer height changes:

     

    http://umforum.ultimaker.com/index.php?/topic/7290-new-plugin-swap-at-height/

     

    Its still under dev. I need to integrate a change tonight in regard to layer heights specifically. Basically you swap with a previously saved gcode for the given z. Check the thread for the specifics.

     

    I hope this can help.

     

  • Link to post
    Share on other sites

    Posted · Alternating Layer Thickness

    thanks pm_dude,

    I did read your thread before I made mine and this would definitely do the trick. I must admit I don't like the "Frankenstein" idea but it would most certainly work and is a clever idea. I think that Dim3nsioneer and nallath are right though, it needs to be done in the curaengine not as a plugin. it would be neater and more user friendly if I can get it right. I may even be able to incorporate the different infill % at the corresponding layer thickness. hmmm you have me thinking now... I am liking this idea muchly... though I did see that gr5 commented saying that the infill % change was going to be in the pink unicorn.

     

  • Link to post
    Share on other sites

    Posted · Alternating Layer Thickness

    In PU there will be settings per object but its not clear (at least not confirmed by Daid) that change at any given heights will be possible.

    I have submitted the changes needed to better handle the height differences.

    I agree that this should be done in CuraEngine but in order to allow for any given set of parameters to be changed it would be a huge chunk to change. Therefore doing it as a post process seemed like the easiest way to go.

     

  • Link to post
    Share on other sites

    Posted · Alternating Layer Thickness

    In PU there will be settings per object but its not clear (at least not confirmed by Daid) that change at any given heights will be possible.

     

    No, in PU currently there is no option to change a setting at a certain height. This requires more engine work.

    (The engine and the backend code can set settings per object, or sub-part of objects, but there is no frontend to do this in yet. Except for which extruder to use for which object/part)

     

  • Link to post
    Share on other sites

    Posted · Alternating Layer Thickness

    ah that's an idea... there's me thinking of setting a specific z range for changes but of course the key is multiple objects or parts, though for my idea to work the join needs to be a straight horizontal cut (this would be perfect of pm_dude's infill change too). I'm not using dual extrusion so the thought never crossed my mind. though I can foresee that a decent amount of frontend work would need to be done in order to get something like this working.

    Daid you are a Genius!

    too many ideas... where to begin... not only that all this code is new to me and after staring at it for a few hours its like looking at hieroglyphics haha

    is there an ETA on PU??

     

  • Link to post
    Share on other sites

    Posted · Alternating Layer Thickness

    is there an ETA on PU??

     

    Nope. I'm doing small things on it, but my main priorities are elsewhere right now.

     

  • Link to post
    Share on other sites

    Posted · Alternating Layer Thickness

    I'm a little rusty with the code and its taking me a while to figure out what's what! haha

    I'm just brainstorming here,

    I think I need to get the merge function happening with only one extruder and have extra conditioning to suit the use of one extruder with the merge option when multiple settings are required. I can't find in the code where the merge function is called. From what I can tell in the code in the merge function actually creates a single object from 2 objects.

    my problem at the moment is trying to locate the relevant bits of code to alter and add to. I don't think the Curaengine will need touching just the python code that sends the parameters to the engine. actually maybe not, as the engine uses the extruder count to know which part to create gcode for... so a minor change. maybe something like an extra parameter from the python script to the engine to allow for one extruder but multiple parts with different parameters. (I'll stick with 2 for now)

    Then I would need the engine to use the different properties for these parts. This should be relatively simple as I think the engine gets the parameters for each part it sends through for processing. Therefore depending on which part is being processed at the time I could have a condition for choosing the correct layer thickness and infill percentage. these extra parameters would have to be sent to the engine and then processed by the engine I think.

    In summary, I can manipulate the GUI no problem and I found were the python code determines the number of extruders used by the machine. However, I need to find the code that calls the merge option and [found it] where the engine calls the layer and infill parameters cos for the life of me I can't seem to see them.

     

  • Link to post
    Share on other sites

    Posted · Alternating Layer Thickness

    I'm still looking into this, I will admit I'm having trouble. I am an engineer not a software programmer everything I know about scripts is self taught.

    I think I've worked out how the engine knows which extruder to use but I'm only guessing based on the way the python code send the info to the engine. I haven't looked to much at the engine itself, mostly as I don't want to edit it if I don't have to. From what I can tell the objects in the scene are stored in an array or list as an object list with a mesh list within each object. if the dual or multiple extrusion merge is used then the 2 objects are joined creating 2 mesh lists within one object. I'm assuming this is how the engine knows which mesh is which and chooses the tool number to suit.

    am I on the right track?

    so far all I've done is create an option on the scene right click that instead of a dual extruder merge there is a part merge (which works the same way at the moment) but its based on an extra variable. the GUI alteration I've done is that you can select how many parts. if it is greater than 1 then dual/multi extrusion is disabled this will then give you the right click option of merging the objects. also when the part number is > 1 the extra layer height and infill options appear. but so far they are just hollow promises! :mrgreen:

    does anyone have any ideas? I'm just hoping PU isn't changing all this too much making it obsolete

     

  • Link to post
    Share on other sites

    Posted · Alternating Layer Thickness

    I don't expect one python line to be the same in traditional Cura and PU. Daid really began from scratch again with PU.

    The CuraEngine is much more future-proof. I recently saw Daid submitting changes to both the master and the PU branch of the CuraEngine.

     

  • Link to post
    Share on other sites

    Posted · Alternating Layer Thickness

    ah ok well I might just quit now and wait and see.

    maybe I'll just focus on what to print next for now!

     

  • Link to post
    Share on other sites

    Posted · Alternating Layer Thickness

    On the other hand I also don't expect PU to be released anytime soon with Daid being assigned to the UM2 dual extrusion development. I'm pretty sure that Cura 14.09 is not the last version with the present GUI.

     

  • Link to post
    Share on other sites

    Posted · Alternating Layer Thickness

    ok kool, well I don't think I'd be able to switch my brain off from it anyway... I spend 3 weeks at a time away from home where my printer and only one week at home before returning to work. So other than that, drawing something else to print the only thing I can do is read thousands of lines of code 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
    • Our picks

      • UltiMaker Cura 5.7 stable released
        Cura 5.7 is here and it brings a handy new workflow improvement when using Thingiverse and Cura together, as well as additional capabilities for Method series printers, and a powerful way of sharing print settings using new printer-agnostic project files! Read on to find out about all of these improvements and more. 
         
        • 18 replies
      • S-Line Firmware 8.3.0 was released Nov. 20th on the "Latest" firmware branch.
        (Sorry, was out of office when this released)

        This update is for...
        All UltiMaker S series  
        New features
         
        Temperature status. During print preparation, the temperatures of the print cores and build plate will be shown on the display. This gives a better indication of the progress and remaining wait time. Save log files in paused state. It is now possible to save the printer's log files to USB if the currently active print job is paused. Previously, the Dump logs to USB option was only enabled if the printer was in idle state. Confirm print removal via Digital Factory. If the printer is connected to the Digital Factory, it is now possible to confirm the removal of a previous print job via the Digital Factory interface. This is useful in situations where the build plate is clear, but the operator forgot to select Confirm removal on the printer’s display. Visit this page for more information about this feature.
        • 0 replies
    ×
    ×
    • Create New...