Jump to content

Cura 3.2 Beta-Adaptive Layers


kmanstudios

Recommended Posts

Posted · Cura 3.2 Beta-Adaptive Layers

At this time, I find the adaptive layers to be very limited in application. Unless it is a single model with no overlaps, it can do some very limited things. It will do some odd things like if two separate models, not touching, it will only slice up to one of the lower models. If all the same height, the models get an averaged adaptive layering and not able to differentiate.

 

Unless I am missing something in its current implementation (entirely possible) I am not finding this to be the super cool thing I had hoped for at this point in time. But it does show promise in a lot of ways.

  • Link to post
    Share on other sites

    Posted · Cura 3.2 Beta-Adaptive Layers

    Just went in and set up a model that I made sure the file that created the void and the master solid file did not overlap. But, since the interior void file either had the modified settings for creating the void, or was inside the other model, it would not use adaptive slicing beyond the first layer that the void began.

  • Link to post
    Share on other sites

    Posted · Cura 3.2 Beta-Adaptive Layers

    Yup, that's because it's very hard to implement. This is just a start to see how to move forward from here. With multiple models it's almost impossible as the layer heights are different per model then, which could cause a collision with the print head.

     

    In short, this was the most I could do in ~4 weeks without having to rewrite the entire CuraEngine :p

  • Link to post
    Share on other sites

    Posted · Cura 3.2 Beta-Adaptive Layers

    Please note that this is not complaining. More like making notes of things that need improvement.

     

    For instance an alternative to averaging the whole group would be to allow for picking of 'lead object' to prioritize the establishment of layering.

     

    This is in beta too, so I would not expect it to be perfect. And for 4 weeks lead time.....well, wowsah!!  :+1:

  • Link to post
    Share on other sites

    Posted · Cura 3.2 Beta-Adaptive Layers

    I did find something interesting today about the adaptive layers. I was messing with a model that I am printing and had to really crank up the "Adaptive Layers Threshold" because of the geometry of the model. I wanted a more even spread of layer heights because it wanted to default to very low levels at the default threshold across the model. The model had a lot of slope differences and a higher threshold made it recognize the slopes better.

    This is the file at a default threshold. Notice that it is almost all teeny, weeny, itsy bitsy, layerinis. And the time...</George Takei> Ohhh Myyyy....</end George Takei>

    DefaultThreshold.thumb.jpg.05adc2aa7e4cf55b9579d0ce43f405c8.jpg

     

    Now, cranked way the heck up a much better spread across low and steep slopes to get a better spread of thicknesses. And the time....</Bruce Willis> YippeeKaiyay Mo'Fo'</endBruce Willis>

    HighThreshold.thumb.jpg.eff4d0ad66dffa9fea30a90c2358b262.jpg

  • Link to post
    Share on other sites

    Posted · Cura 3.2 Beta-Adaptive Layers

    Cool :)

     

    Yeah, this is why I left the somehow hard to explain threshold parameter in there, the results are very different per geometry.

  • Link to post
    Share on other sites

    Posted · Cura 3.2 Beta-Adaptive Layers

    I found that the issues I had before were mainly when objects overlap. Instead of seeing the union as Cura can produce, it really mucks it up. So, for this model, I went in and had to volumetrically mess with it to create the void space so that I can drop in weights when it reaches the cavity, but also allows for the varialbe layering.

     

    It is cool. :)

  • Link to post
    Share on other sites

    Posted · Cura 3.2 Beta-Adaptive Layers
    3 hours ago, ctbeke said:

    Cool :)

     

    Yeah, this is why I left the somehow hard to explain threshold parameter in there, the results are very different per geometry.

    Yeah, I do feel for your mission accomplishments. I am just hoping that some sort of feedback can help you in your quest to make this truly robust.

     

    And, BTW, 4 weeks to get this implemented at this level is pretty impressive programming and thought processes.

  • Link to post
    Share on other sites

    Posted · Cura 3.2 Beta-Adaptive Layers

    What IS the precise definition of the threshold value?

     

  • Link to post
    Share on other sites

    Posted · Cura 3.2 Beta-Adaptive Layers

    Concerning:

    5 hours ago, ctbeke said:

    Cool :)

     

    Yeah, this is why I left the somehow hard to explain threshold parameter in there, the results are very different per geometry.

    According the source code, the threshold is an angle? Or at least use the function: "getSettingInAngleDegrees" - so maybe it is a slope where you use it as an angle. Is that because it is entered as a slope but you need an angle? Wouldn't angle be easier to understand? You write: "If a layer section contains steeper angles on the outer wall, the layers will be thinner. " A steeper angle on a 3D print would be closer to vertical - but I guess you mean lower angle - closer to horizontal? So that in itself is confusing.From the source it seems like you take the tangent (tan()) of the triangle normal vector slope - hence the 90 degrees confusion - vertical becomes horizontal and so on. 

     

    So a bit more clarity about the parameters - are they angles or slopes. Slopes of what exactly and how is it used to determine the angle. Should be easy to explain if you know what you're doing ;-) - which I'm sure you do. 

     

    A simple angle would be much easier to understand, stating the angle (from horizontal) below which the layers should start decreasing in size, so the set layer thickness is only decreased and never increased. 

     

    Thanks for adding the feature - it is a great enhancement and will ultimately be very useful - and the performance of the algorithm in terms of deciding how to change layer height seems very good.

     

  • Link to post
    Share on other sites

    Posted · Cura 3.2 Beta-Adaptive Layers

    The formula is layer_height / tan(steepest_slope_in_layer) <= threshold. So the threshold value is compared to the potential layer height divided by the tangens of the steepest slope in the potential layer. In this case an angle of 0 is a horizontal flat surface and 90 is a vertical surface (i.e. the steepest possible slope). The 90 degree offset is there to make sure the algorithm works in the right direction for the threshold comparison.

     

    Code details: https://github.com/Ultimaker/CuraEngine/blob/master/src/settings/AdaptiveLayerHeights.cpp#L158.

     

    • Thanks 1
    Link to post
    Share on other sites

    Posted · Cura 3.2 Beta-Adaptive Layers
    On 1/26/2018 at 11:49 AM, ctbeke said:

    The formula is layer_height / tan(steepest_slope_in_layer) <= threshold

     

    I just looked at the code. What I think @ctbeke means is that as soon as a layer_height is thin enough to satisfy the above formula, the algorithm stops trying to make the layer thinner.  Also looking at the code he got it backwards - "steepest_slope_in_layer" appears to actually be flattest slope in layer.

     

    Another way to look at it:

    adaptive-layer-height = threshold * tan(flattest_slope_in_layer) 

     (but it never goes outside the min and max layer heights)

     

    I think.  Did I get that right @ctbeke?  cool feature by the way!

    I'm pretty sure that's right.  It's just that instead of doing the simple formula above the algorithm is trying different layer heights - getting thinner and thinner until it satisfies the first formula above.

    I think more complexity should be added to the algorithm - the algorithm should distinguish sloped overhangs from sloped top surfaces - I know right now it just deals with a huge list of triangles in 3 dimensions but still - it should know which ones are top and which are underside surfaces and have different minimum_layer_heights for the two types because you don't want to add extra layers for overhangs.  You only want to add extra layers for top surfaces.  Adding thinner layers for top surfaces makes the stair-step pattern disappear.  Adding more layers for overhangs makes the quality go to hell.

  • Link to post
    Share on other sites

    Posted · Cura 3.2 Beta-Adaptive Layers

    @gr5 That's right! Indeed it tries a layer height with that formula. If it doesn't satisfy the threshold it'll try the next 'allowed' layer height (1 step size smaller). Also in our case, steepest means the one closest to a horizontal surface. The naming might be a bit weird, but it's 'steep' in the context of the algorithm.

     

    Indeed we could differentiate between overhangs and top surfaces to improve results, that's not too hard to detect. I did see some results though where an overhang with adaptive layer height actually made a print possible (https://github.com/Ultimaker/Cura/issues/2877#issuecomment-348109846).

     

    Food for thought!

  • Link to post
    Share on other sites

    Posted · Cura 3.2 Beta-Adaptive Layers

    Just want to throw this in here over making a new thread, I'm loving the Adaptive Layers.

     

    Really the next thing that would take this to the next level is getting it to play nice with supports (normal and tree).

    • Like 3
    Link to post
    Share on other sites

    Posted · Cura 3.2 Beta-Adaptive Layers

    I simply want two different minimum layer heights.  One for top and one for under surfaces.  This will only change maybe 3 lines of code in the current algorithm but add yet another cura parameter.

     

    Personally I would probably choose 0.06mm minimum layer height for top surfaces and 0.1mm mimimum layer height for overhangs.

  • Link to post
    Share on other sites

    Posted · Cura 3.2 Beta-Adaptive Layers
    1 hour ago, gr5 said:

    simply want two different minimum layer heights.  One for top and one for under surfaces.  This will only change maybe 3 lines of code in the current algorithm but add yet another cura parameter.

     

    Sorry if this has been explained earlier but what I don't understand about the idea of having different min layer heights for over and under surfaces is how would it cope if you have a model like a simple cylinder tilted over at a slant so each layer would have both overhang and underhang regions? One layer can only have a single layer height so which would you choose?

  • Link to post
    Share on other sites

    Posted · Cura 3.2 Beta-Adaptive Layers

    Thanks for that feature, it is promising. 

     

    It would be cool if we could choose the area that we want the tune the precision.

    Lets say that I'm printing a jig for what ever reason, and the only thing that I care about is a precise hole, wall, floor.. the rest could be shit, It does not matter.

    Having the option to get that precision on those precise areas would be great. 

     

    Actually this is pretty much the case in the industrial application that we are planning to use this printer.

    • Like 1
    Link to post
    Share on other sites

    Posted · Cura 3.2 Beta-Adaptive Layers

    Just a point of clarity - does ALH only reduce layer height from the assigned value, or can it go either way (increase or decrease)? Should we set it e.g. 0.32mm for a 4mm nozzle, or 0.2 with a 0.12mm max variation to give a range between 0.08mm and 0.32mm?

  • Link to post
    Share on other sites

    Posted · Cura 3.2 Beta-Adaptive Layers
    1 minute ago, colmoni said:

    Just a point of clarity - does ALH only reduce layer height from the assigned value, or can it go either way (increase or decrease)? Should we set it e.g. 0.32mm for a 4mm nozzle, or 0.2 with a 0.12mm max variation to give a range between 0.08mm and 0.32mm?

    Yes - it both goes up and down from the default layer thickness

    • Like 1
    Link to post
    Share on other sites

    Posted · Cura 3.2 Beta-Adaptive Layers
    On 1/30/2018 at 12:08 PM, smartavionics said:

    One layer can only have a single layer height so which would you choose?

    It's a minimum, not a required height.  So if one minimum says .06mm and the other says .08mm then you go with the .08mm.

  • Link to post
    Share on other sites

    Posted · Cura 3.2 Beta-Adaptive Layers

    Hi, I´m just trying messing with the Adaptive Layer Height, and it´s quite difficult to understand it.

    Check my settings in the image below!

    By setting the Variation step size to a bigger 0.05 the time calculated to print grows!

    That´s not right for me, if you start with a 0.1 layer and end with a 0.3 layer height having less steps  (step size bigger) to reach the 0.3 it should takes less time.

     

    Another thing is that if I disable the Adaptive Layers it will also calculate a short time to print it!

    Am I missing something? Sory if this dumb question, I´m a noob!

     

    image.thumb.png.fbf9f980ba9f0fc88d08e2d3c3a1a377.png

  • Link to post
    Share on other sites

    Posted · Cura 3.2 Beta-Adaptive Layers

    @zmp2000 I'm pretty sure it is because the ALH is decreasing the height of more layer than it is increasing it. You have a base layer height of .1mm, with ±.2mm variance (the first of the ALH parameters), witch mean that you can go from 0mm (or whatever is the closest to 0 layer hight) to .3mm. You can easily control it by using "layer view" -> "layer thickness".

  • 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.8 Stable released 🎉
        In the Cura 5.8 stable release, everyone can now tune their Z seams to look better than ever. Method series users get access to new material profiles, and the base Method model now has a printer profile, meaning the whole Method series is now supported in Cura!
        • 5 replies
      • Introducing the UltiMaker Factor 4
        We are happy to announce the next evolution in the UltiMaker 3D printer lineup: the UltiMaker Factor 4 industrial-grade 3D printer, designed to take manufacturing to new levels of efficiency and reliability. Factor 4 is an end-to-end 3D printing solution for light industrial applications
          • Thanks
          • Like
        • 3 replies
    ×
    ×
    • Create New...