altium monkey v2026.11.26 · gobblerito
On This Page (16)

altium-monkey 2026.05.23 Release Notes

Package version: 2026.5.23

2026.05.23 is represented in Python package metadata as the PEP 440 canonical form 2026.5.23.

This release adds the first experimental Python Draftsman .PCBDwf API, promotes explicit PcbDoc differential-pair objects and component source metadata into the Python public API, improves schematic embedded-image payload handling, adds root viewBox controls for SVG output, and restores cumulative release-note history back to the first 2026.04 package version.

Initial Experimental Draftsman Support

AltiumDraftsmanDocument now exposes a conservative Python API for Draftsman files. It can load raw XML and legacy LZ4-compressed .PCBDwf containers, write raw XML outputs, create a blank AD25-profile document, set the linked source PcbDoc filename, inspect pages/items, and preserve unsupported XML subtrees.

The initial typed model includes:

  1. AltiumDraftsmanPage
  2. AltiumDraftsmanItem
  3. AltiumDraftsmanNote
  4. AltiumDraftsmanNoteElement
  5. AltiumDraftsmanText
  6. AltiumDraftsmanPicture
  7. AltiumDraftsmanDocumentOptions
  8. DraftsmanColor, DraftsmanPoint, DraftsmanSize, DraftsmanRect, and DraftsmanMargin
  9. DraftsmanFontStyle and DraftsmanFontDecoration
  10. DraftsmanStandardSheetSize, DraftsmanNoteBorderStyle, DraftsmanHorizontalAlignment, and DraftsmanVerticalAlignment

New authored paths include page.add_note(...), page.add_text(...), page.add_picture(...), document font-style lookup/reuse, page-size helpers, and visual placement helpers such as page.point_from_top_left(...) and page.rect_centered(...).

Three public examples were added:

  1. draftsman_create_blank_project
  2. hello_draftsman
  3. draftsman_add_image

Draftsman support is experimental in this release. Unsupported objects remain raw XML and the API can change as more object families are promoted.

SVG Output Contract Updates

Schematic, schematic-library, PcbDoc, and PcbLib SVG output now have documented root viewBox behavior. Normal output includes a root viewBox; render options expose include_view_box=False for strict comparison lanes or downstream compatibility paths that need width and height without a root viewBox.

The public SVG contract now documents group structure, semantic data-* attributes, relationship JSON linkage for schematic renders, PCB layer metadata, and the PCB enrichment metadata payload.

PCB Layer Display Labels

PcbLayer.to_display_name() now returns default human-facing PCB layer labels such as Top Layer, Bottom Layer, Top Overlay, and Top Solder, while to_json_name() remains the stable token API for machine-readable output.

Parsed PcbDoc SVG output uses resolved board layer-stack display names when the board provides them and falls back to PcbLayer.to_display_name() otherwise. PcbLib footprints do not own a board layer stack, so footprint SVG output uses the default display labels.

PcbDoc Polygon Authoring Notes

PcbDoc region authoring can carry optional polygon realization linkage through polygon_index, subpoly_index, and union_index. This keeps authored region records able to preserve editable polygon relationships when callers know those indexes.

The PcbDoc planning docs also separate typed polygon-pour field promotion from raw record preservation and polygon realization/linkage work, so later polygon modeling can proceed without overclaiming automatic repour behavior.

Improved SchDoc And SchLib Embedded Images

Schematic image extraction and SVG rendering now prefer native payloads stored inside Altium image wrappers such as TdxPNGImage instead of falling back to BMP previews when a better original payload is available.

The image path now preserves PNG and 32-bit BMP alpha and no longer treats the schematic background color as the normal transparency keying path. This improves visual fidelity for embedded logos and transparent schematic graphics while keeping extracted image assets closer to the original Altium payload.

New PcbDoc Differential-Pair APIs

AltiumPcbDoc now parses DifferentialPairs6/Data into pcbdoc.differential_pairs. Each AltiumPcbDifferentialPair exposes:

  1. name
  2. positive_net_name
  3. negative_net_name
  4. gather_control
  5. unique_id

Common lookup and authoring helpers are now available:

  1. pcbdoc.get_differential_pair(name)
  2. pcbdoc.differential_pair_classes
  3. pcbdoc.differential_pairs_by_net_name
  4. pcbdoc.add_differential_pair(...)
  5. PcbDocBuilder.add_differential_pair(...)

The model keeps concrete differential-pair objects separate from differential-pair classes in Classes6/Data, signal classes, routing rules, and project suffix policy.

New PcbDoc Component Source Metadata APIs

AltiumPcbComponent now exposes source and ECO provenance fields that are important for repeated sheets, channels, and board-to-schematic traceability:

  1. channel_offset
  2. source_designator
  3. source_unique_id
  4. source_unique_id_segments
  5. source_hierarchical_path
  6. source_hierarchy_segments
  7. source_component_library
  8. source_component_library_identifier_kind
  9. source_component_library_identifier
  10. source_lib_reference
  11. footprint_description

Component designator/comment autoposition fields are now enum-backed through PcbTextAutoposition:

  1. name_auto_position
  2. comment_auto_position

Optional component flags are also exposed where present:

  1. lock_strings
  2. enable_pin_swapping
  3. enable_part_swapping
  4. jumpers_visible

AltiumPcbDoc.add_component(...) and PcbDocBuilder.add_component(...) accept these fields for authored components. Newly authored components no longer invent NAMEAUTOPOSITION or COMMENTAUTOPOSITION fields when callers do not supply explicit values.

Examples

Two public PcbDoc examples were added:

  1. pcbdoc_add_differential_pairs creates a PcbDoc from scratch, adds differential-pair objects with routed member nets, and saves a generated board plus JSON summary.
  2. pcbdoc_diff_pair_report loads the RT Super C1 project, reads differential pair objects and classes, prints a table, and writes JSON plus text reports.

Bug Fixes

Schematic Embedded Images Preserve Native Alpha Payloads

Embedded schematic images with native alpha data now render and extract without forcing background-color keying. PNG payloads and 32-bit BMP payloads keep their alpha channel when the stored Altium wrapper provides it.

Draftsman Explicit Fonts Clear Document-Font Flags

Draftsman note and text helper methods now clear the relevant UseDocumentFont flag when callers supply an explicit font style. This makes generated notes and text render with the requested font family, size, and decoration flags instead of silently falling back to the document default font.

Authored PcbDoc Components Do Not Invent Autoposition Fields

Component authoring no longer emits default NAMEAUTOPOSITION or COMMENTAUTOPOSITION fields unless the caller supplies explicit enum values. This better matches Altium files where those fields are absent and avoids introducing board metadata that was not present in the source intent.

Release Notes Preserve Public History

The public RELEASE_NOTES.md file now carries historical release sections back to 2026.04.15. The Git tags already preserved this history, but the current branch's release-notes file only carried the latest two sections before this release.

Public API Compatibility

Existing documented APIs remain compatible. This release adds new optional PcbDoc component and differential-pair fields and helpers. The component autoposition write behavior is more conservative for new authored components: fields are omitted unless explicitly supplied.

Differential-pair object support reads and writes explicit PcbDoc pair objects. Naming-policy inference from .PrjPcb suffix declarations and broader PCB object-class/room modeling remain future work.

Draftsman APIs are newly introduced and experimental. They are documented for the supported objects above, but the shape may change as dimensions, board views, generated tables, title blocks, and other Draftsman object families are modeled.

Supported Python Versions

This release supports Python 3.11 and Python 3.12.

Python 3.13 is not advertised yet. The core package may work on Python 3.13, but the CadQuery/OCCT/VTK dependency path used for STEP model bounds has not been validated on Python 3.13.

Functional Gaps

No new functional gaps were introduced in this release. The PcbDoc object-model and authoring limitations described in the 2026.05.20 release notes still apply.

altium-monkey v2026.11.26 · gobblerito·Docs updated 2026.11.29 17:55 UTC (0665053)