# Variable layer height in the same gcode?

**URL:** <https://forum.snapmaker.com/t/variable-layer-height-in-the-same-gcode/17311>\
**Category:** Snapmaker Luban\
**Created:** [March 27, 2021, 12:25am UTC](https://forum.snapmaker.com/t/variable-layer-height-in-the-same-gcode/17311 "2021-03-27T00:25:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Meisco](https://avatars.discourse-cdn.com/v4/letter/m/d9b06d/32.png) [@Meisco](https://forum.snapmaker.com/u/Meisco)\
**Post date:** [March 27, 2021, 12:25am UTC](https://forum.snapmaker.com/t/variable-layer-height-in-the-same-gcode/17311/1 "2021-03-27T00:25:17Z")

</div>

Hi

Can Luban generate variable layer height in the same gcode? I have a print that has some flat and gentle sloping surfaces at the base, and then quickly transitions to steep vertical. The vertical surfaces look amazing, even at 0.24mm layer height, but the flat surfaces are less than desirable! I’d like the first 4 to 5mm of the print be at 0.08mm layer height.

[IMG\_3239|375x500](https://forum.snapmaker.com/uploads/short-url/3wST6WBYbe1U5xYRhXkx7SUumEG.jpeg)

Maybe generate 2 gcodes . . . one at 0.08mm layer height and the second at 0.24mm . . . and then stitch them together at the appropriate z height?

Pete

---

<div class="post-metadata">

**Author:** ![ctaddey](https://avatars.discourse-cdn.com/v4/letter/c/bbe5ce/32.png) [@ctaddey](https://forum.snapmaker.com/u/ctaddey)\
**Post date:** [March 27, 2021, 2:34am UTC](https://forum.snapmaker.com/t/variable-layer-height-in-the-same-gcode/17311/2 "2021-03-27T02:34:45Z")

</div>

No, you need to use Cura for that.  
It’s good to speed things up, but in my case there was some color/surface changes between the different heights…  
I guess you could do 2 gcodes and then cut and paste but…seems a lot of work.

---

<div class="post-metadata">

**Author:** ![clewis](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.snapmaker.com/clewis/32/3255_2.png) [@clewis](https://forum.snapmaker.com/u/clewis)\
**Post date:** [March 29, 2021, 5:39pm UTC](https://forum.snapmaker.com/t/variable-layer-height-in-the-same-gcode/17311/3 "2021-03-29T17:39:37Z")

</div>

I wasn’t aware that Cura supported variable layer heights, but [apparently it does](https://www.reddit.com/r/Cura/comments/f7vl54/is_there_a_way_to_print_a_model_with_multiple/). I haven’t tried it though. I’m generally not time constrained, so I just print high resolution most of the time.

Cura has a bit of setup, but once it’s done, it’s pretty much like using Luban. But if you really want to do it the hard way (there’s lot of things you can learn), brent113 posted about [recovering a failed print](https://forum.snapmaker.com/t/air-print-recovery-a-success-story/10357) by restarting mid print. Obviously it’s more complicated to mix the layer heights, but it should only be a bit more difficult.
