MAGMA

Magma Honeycomb Pattern — Design Note (locked)

Fourth Magma infill pattern, after Triangle, Rectilinear, and Tri-hex. This note is the implementation reference; the design below is settled.

Print note: honeycomb sealed poorly on the one plate that tested it. The suspected cause is the doubled vertical walls described below, which leave a join running the full height of the tube. Unconfirmed, and it predates the current seal model. See PATTERNS.md.

Terminology: honeycomb cells are regular hexagons that pair into the same U-tube as the triangle and rectilinear patterns — two adjacent cells joined by a window gap at their shared wall, injected down one and vented up the other. It is the degenerate 1-leg manifold, exactly like triangle/square; only the cell shape and the toolpath differ. The hexagon math is identical to the tri-hex hub (the hub IS a hexagon), so the geometry is reused; what differs is hex↔hex pairing instead of hub↔vent, and the continuous honeycomb sweep toolpath.

1. Lattice — regular pointy-top hexagons

2. Cell geometry — HexagonGeometry (MagmaGeometry impl)

Walls are single shared beads centred on the edges, so the open interior is the hexagon inset by line_width/2 per side → open apothem a' = (s − lw)/2 = interior/2.

3. Squish compensation — pre-expanded lattice (the honeycomb-specific bit)

The toolpath (§4) draws the VERTICAL walls doubled (two beads, total width 2·lw, centred on the edge → intrudes lw into the open) and the slants single (one bead → intrudes lw/2). Left uncompensated the open hexagon comes out skewed (verticals ≠ slants). To make the OPEN tube the original regular hexagon (edge e), HexLattice pre-expands the tiling on every affected axis (lw = line width):

With all three, the open hexagon’s vertical edge and slant edge come out exactly equal (= e): a true regular hexagon. World transform: to_world(q,r) = (m_sx·(q + r/2) + ox, m_row·r + oy); cell_corners uses hx = m_sx/2, hy = e/2, with the top/bottom vertices at ±m_vtop.

4. Toolpath — FillMagmaHoneycomb::_fill_surface_single

Reuses OrcaSlicer’s native continuous honeycomb sweep (Orca-style), phased to the lattice so windows/injection land on the drawn walls. Instead of analytic line families (triangle/square) it emits one continuous zigzag per lane PAIR:

Why doubled (and not a bug): the honeycomb wall graph has degree-3 vertices (three edges meet at each hexagon corner at 120°). An Eulerian path — trace every edge once with no travel — requires all-but-two vertices to have even degree; degree-3 is odd everywhere, so no single-pass, no-travel tracing of the honeycomb exists. The native sweep buys a continuous, low-travel, no-mid-path-retraction path — which is why honeycomb prints fast — at the price of re-tracing the shared vertical edges. The extra vertical material is not an error: it is measured into the injection void (§5), and the open tube is still a regular hexagon by §3.

Anchoring is disabled (zone shells provide the bonding surface); chain_or_connect_infill routes the swept lanes (no_sort preserves the merged ordering).

5. Window placement & injection volume

Windows — for each open U-tube pair (the solver decides which pairs are open on a given layer), find the two corners shared by cell_a and cell_b’s corner rings and build a rectangle oriented along that shared edge (direction d, normal n): half-length hl = len/2 so it spans the full flat edge, half-width hw = x_off + lw so it cuts through both doubled vertical beads. The rectangle is subtracted from the swept polylines with diff_pl. Unlike triangle/square (which cut per-line-family intervals), honeycomb subtracts geometric rectangles, because the zigzag is one continuous path not separable into families. Same pairing / stagger / window_open_at system as the other patterns; windows span the full flat edge of the shared hex side.

Injection volume — measured from the real toolpath (MagmaTubeMap::measure_volumes, run after PrintObject::infill() when the deposited paths exist): per layer, (cell_a ∪ cell_b) ∩ zone minus the deposited wall footprint (polygons_covered_by_width), × the actual layer height, summed over the run. The doubled vertical walls are captured exactly by that footprint — no per-shape area estimate, and honeycomb’s vertex-overlap subtraction is zero (no crossings; §6).

6. Overlap

7. Solver / injection / preview — UNCHANGED

8. New vs reused