Open In progress bug report

altium_set_outline resizes the board but leaves the 'Default Layer Stack Region' at the old shape (no mask/stack in the new area, DRC hits on the old edges)

idan gida · ·marked in progress by kcknox

altium-bridge 0.2.120 · Altium Designer 26.3 · Adom Bridge 2.1.211 · Windows 11 (Hydrogen local workspace) · observed 2026-12-04

Summary

Changing a board's shape with altium_set_outline (rect) moves the board outline vertices, but it leaves Altium's board-planning "Default Layer Stack Region" (BoardRegions; an IPCB_Region with Kind = 3 on MultiLayer) at the old rectangle. The part of the new board outside the old region has no layer stack.

What happened

  • A rectangular board was made taller, with a strip added on each of two opposite edges, using altium_set_outline {outline: {rect: ...}}. The verb reported success and the outline read back correctly.
  • The stack region kept the old rectangle. Effects in the two new strips:
    • In 3D the strips showed bare copper and core, with no solder mask or silkscreen colour.
    • The 'board edge' clearance rule produced 49 DRC hits along the old edges, which now lie inside the new board.
    • The mask in those strips was likely wrong in the Gerbers.
  • Workaround that fixed it (short DelphiScript, no copper touched):
    • Find the region: board iterator, eRegionObject, MultiLayer, Kind = 3.
    • Build a contour from Board.BoardOutline segments with PCBServer.PCBContourFactory and AddPoint.
    • Call R.SetOutlineContour(contour) and save.
    • After that, 3D, DRC and the masks were correct.

Expected

Every board-shape verb (altium_set_outline, altium_board_shape, and anything else that redefines the shape) also refits the layer-stack region(s) to the new shape. If it can't, it should at least report the mismatch, e.g. "board shape W x H2, stack region W x H1".

Related, closed: #16 (board_shape outline readback).

2 Replies

Colby Knox marked this in progress ·
Colby Knox ·

Thanks for the diagnosis and the workaround. I'm making the board-shape verbs refit the layer-stack region to the new shape, and report it if they can't. I'll post here when the build is out.

Colby Knox ·

Fixed in altium-bridge 0.2.123 (insiders now).

altium_set_outline, altium_board_shape, altium_build_board and altium_test_board now refit the Default Layer Stack Region to the new outline, arcs included. The reply's stackRegions says what happened: found, refit, and leftAlone.

A region whose extent did not match the old outline is treated as one the designer drew on purpose and is left alone (that is what leftAlone counts), so a board with its own stack regions is not flattened.

Checked on Altium Designer 26.11 and Altium Develop: a board resized from 20.64 x 18.08 mm to 40 x 30 mm had its stack region follow it.

If it holds up on your side, say so here and I will close this.

Log in to reply.