Skip to content

Add Inner/Outer/Inner wall ordering - #2403

Open
quix2k23 wants to merge 1 commit into
Ultimaker:mainfrom
quix2k23:inner-outer-inner-walls
Open

quix2k23 wants to merge 1 commit into
Ultimaker:mainfrom
quix2k23:inner-outer-inner-walls

Conversation

@quix2k23

@quix2k23 quix2k23 commented Oct 11, 2026 •

Copy link
Copy Markdown

Description

Adds an Inner/Outer/Inner wall order, available for both Wall Ordering and Initial Layer Wall Ordering. The walls deeper inside are printed first, from the inside out, then the outer wall, then the second wall. The outer wall is then printed between walls that are already in place, which is the sequence people know as "inner/outer/inner" from other slicers. Requested in Ultimaker/Cura#18955.

Walls Order
4 wall 3, wall 2, outer wall, wall 1
3 wall 2, outer wall, wall 1
2 outer wall, wall 1
1 outer wall

(wall 0 is the outer wall, wall 1 the one just inside it.)

How it works: InsetDirection gets a third value, INNER_OUTER_INNER, parsed from the setting value inner_outer_inner. InsetOrderOptimizer expresses the order as constraints between neighbouring walls, like it already does for the other two orders, so the path optimizer keeps choosing start points and the route. Both existing code paths are covered: the per-region order (Optimize Wall Printing Order on) and the per-inset order (off).

Behaviour to be aware of:

  • With two walls or fewer there is nothing to put the outer wall between, so it prints the outer wall first, then the inner one.
  • It only applies when the outer wall and the inner walls use the same extruder; with different extruders it falls back to inside out.
  • Group Outer Walls has no effect with it, because that option assumes the outer walls are printed first or last.
  • Initial Layer Wall Ordering follows Wall Ordering by default, so the new value reaches the first layer as well unless it is changed.

The matching change to the setting definitions (the new menu entry) is in the Cura repository: Ultimaker/Cura#21839

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • New unit test WallsComputationTest.WallOrderInnerOuterInner: checks the exact order constraints for 2, 3, 4 and 5 walls, and that the old outside-in flag does not change the result.
  • The complete unit test suite (31 tests) passes with the change, built on current main.
  • End to end: sliced a ring-shaped part (outer contour and a hole) with 2, 3 and 4 walls and read the printed order back from the G-code. It matches the table, with Optimize Wall Printing Order both on and off.
  • The first layer uses Initial Layer Wall Ordering and all other layers use Wall Ordering, checked for the three combinations of inside out and inner/outer/inner.
  • Inside To Outside is unchanged (same order as before).

Test Configuration:

  • Operating System: Linux, CuraEngine built from current main

Checklist:

  • My code follows the style guidelines of this project as described in UltiMaker Meta (formatted with the repository's .clang-format)
  • I have read the Contribution guide
  • I have commented my code, particularly in hard-to-understand areas
  • I have uploaded any files required to test this change (the unit test is part of this pull request)

Adds the inner_outer_inner value to the inset direction, used for both the Wall Ordering and the Initial Layer Wall Ordering settings. The walls deeper inside are printed first, from the inside out, then the outer wall, then the second wall, so the outer wall is printed between walls that are already in place. This is the wall sequence of the same name in other slicers.

With two walls or fewer there is nothing to put the outer wall between, so the outer wall is printed first, then the inner one. The new order only applies when the outer wall and the inner walls are printed by the same extruder; otherwise it falls back to inside out. The group outer walls option is ignored with it, since that option assumes the outer walls are first or last.

It works both with and without the optimized wall printing order. The order is expressed as order constraints between neighbouring walls, like the existing orders, so the path optimizer keeps picking the start points and the route.

Contributes to Ultimaker/Cura#18955.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: Community Contribution 👑 Community Contribution PR's

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant