Add filled polygon regions to an existing PcbDoc.
The sample creates a rectangular board outline, sets the origin to the
lower-left outline corner, and places top and bottom copper regions, a region
with a hole, and a keepout region inside the board. The public method is
AltiumPcbDoc.add_region(...) because Altium represents filled PCB polygons
as region primitives.
AltiumPcbDoc.from_file(...)AltiumPcbDoc.set_outline_rectangle_mils(...)AltiumPcbDoc.add_region(...)- Region holes through
hole_points_mils - Keepout regions through
is_keepout AltiumPcbDoc.save(...)
From the repository root:
uv run python examples\pcbdoc_add_filled_region\pcbdoc_add_filled_region.pyexamples/pcbdoc_add_filled_region/output/pcbdoc_add_filled_region.PcbDoc