Releases: SunboX/gerber-toolkit
Release list
gerber-toolkit 0.4.4
gerber-toolkit 0.4.4
Version 0.4.4 improves large Gerber image composition, corrects a solder-mask
edge case for via-owned copper, and exposes the shared self-adjusting
computation runtime. The changes are structural and apply to every supported
Gerber project without source-specific rules.
Scalable copper composition
- Large copper operand batches are partitioned into transitive spatial
components before polygon union, so disjoint artwork no longer accumulates
through one ever-growing intermediate geometry. - Bounds discovery preserves source order, treats touching bounds as connected,
and retains conservative behavior when an operand cannot be classified. - A bounded sweep-work budget falls back to the established chunked union for
dense overlap instead of allowing quadratic partition work. - Final geometry remains normalized through
polygon-clipping, including
closed rings and the library's existing malformed-input behavior.
Via mask semantics
- A copper flash whose area matches a drilled via is marked as via-owned on the
corresponding surface and cannot open that surface by itself. - A genuinely larger, opened host pad still exposes a via-in-pad surface.
- Side-specific tenting and authored solder-mask behavior remain unchanged.
Shared incremental runtime
- The root entrypoint re-exports
SelfAdjustingComputationfrom
circuitjson-toolkit1.4.1. - Consumers can retain dependency traces across edits while continuing to use
the same parser, project, rendering, interaction, and scene contracts.
Verification
- Tests cover transitive overlap partitioning, stable disjoint components,
large-batch normalization, dense-sweep fallback, malformed geometry,
via-owned flash masking, and canonical runtime identity. - Release gates include the complete package suite, formatter check, feature
preservation audit, benchmark contract, and npm package dry run.
gerber-toolkit 0.4.3
gerber-toolkit 0.4.3
Version 0.4.3 corrects plated-via copper and solder-mask semantics in generated
Gerber 3D scenes. The implementation derives the result from fabrication
geometry and applies to every project without archive-, filename-, or
fixture-specific handling.
Via copper and mask classification
- Plated drill barrels use the largest authored copper flash diameter at their
position. Drill-only holes retain the physical barrel-wall fallback. - Vias are tented independently on each surface whenever that surface has a
solder-mask layer. - A via surface remains open only when its center lies inside a larger copper
pad that is itself opened by the same-side solder-mask image. The smaller via
annulus at the drill position does not classify itself as a host pad. - Via-in-pad containment is evaluated in pad-local coordinates, preserving
offset and rotated pad geometry. - Mask classification runs after drill and barrel construction, so every
plated via receives the side-specific result.
Compatibility
- Parser, project, canonical CircuitJSON, and native extension entrypoints are
unchanged. - Existing copper, solder-mask, outline, drill, slot, and silkscreen projection
remains source-driven. - The 3D scene fields remain additive compatibility data:
isTentingTop,isTentingBottom, and the corrected authored viadiameter.
Verification
- Tests cover ordinary tented vias, a one-sided via-in-pad opening, authored
annulus diameter, and rotated offset host-pad containment. - Release gates include the complete package suite, formatter check, feature
preservation audit, benchmark contract, and package dry run.
gerber-toolkit 0.4.2
gerber-toolkit 0.4.2
Version 0.4.2 supersedes 0.4.1 with complete Gerber draw-run preservation,
material-aware profile nesting, and linear outline-chain assembly. The fix is
derived from RS-274X drawing semantics and applies to every project; it does not
match archive names, source labels, or example geometry.
Draw-run provenance
- Parsed line and arc primitives expose a stable
sourcePathId. - D02 pen-up moves, D03 flashes, polarity transitions, and region boundaries
end the active draw run. - Step-repeat expansion assigns a distinct identity to every repeated instance,
so interleaved expanded primitives reconstruct their own contours. - Caller-built legacy primitives without provenance retain ordered endpoint
continuity as a compatibility fallback.
Physical profile topology
- Unordered reversible chaining remains available for fragmented outer-board
discovery and authoritative X2FileFunction=Profilecontours. - Ambiguous dark cutouts require a region or one directed, closed draw run.
- Reconstructed contours form a deduplicated containment tree. Roots remain
boards, eligible descendants toggle solid/void material, and ineligible
mechanical artwork is transparent while its descendants are still visited. - Strict contour containment uses an indexed boundary test, so a chord crossing
the open part of a concave profile cannot be classified from one interior
vertex alone. - Explicit clear-polarity geometry remains authoritative and board-owned.
Performance and robustness
- Ordered paths append in place; unordered paths retain segment chunks and
flatten once. The projector no longer copies a growing point array for every
segment or spreads an unbounded chain into function arguments. - A 140,000-segment synthetic contour projects without argument overflow.
- On the release machine, nested 2k/4k/8k/16k contours measured
22.1/31.8/48.1/92.8 milliseconds. The reviewed all-pairs containment draft
took about 1,989.5 milliseconds at 16k. - The source-continuous 16k profile median improved from about 391.5
milliseconds in 0.4.1 to about 99.3 milliseconds after chunked chaining.
API and compatibility
- Canonical CircuitJSON document envelopes, parser and project parameters,
package entrypoints, and common service return shapes are unchanged. - Native retained line and arc primitives add the
sourcePathIdproperty. This
is intentional provenance for exact Gerber consumers. - Gerber regions, clear contours, X2 profiles, disjoint boards, fragmented outer
profiles, drilled holes, and plated slots retain their prior behavior.
Verification
- The complete package suite passes 361 tests, including ordered D02 frames,
transparent nesting, step-repeat paths, unordered X2 contours, concave
crossings, dense scaling, and argument-overflow coverage. - The exact reported fabrication archive remains outside the repository. Its
canonical and native projections each expose four physical circular cutouts,
and no large rectangular cutout is present. - Release gates include the feature-preservation audit, formatter check,
benchmark contract, package dry-run, packed-install app tests, local browser
rendering, registry metadata, and GitHub release verification.
v0.4.1
gerber-toolkit 0.4.1
Version 0.4.1 corrects mechanical-profile projection so pen-separated artwork
on an ambiguous mechanical layer is not inferred to be a destructive physical
cutout. Board discovery still accepts fragmented profile strokes, while
cutouts now require the stronger source semantics described below.
Mechanical-profile cutouts
- Unordered, reversible endpoint chaining remains available for discovering
outer board profiles, including fragmented and disjoint outlines. - A nested dark contour becomes an inferred cutout only when it is a Gerber
region, its directed segments form a source-order-continuous closed path, or
the layer has authoritative X2FileFunction=Profilemetadata. - Clear-polarity closed geometry remains explicitly subtractive.
- Drawing frames assembled from pen-separated strokes remain non-destructive,
while legitimate continuous, region-based, clear-polarity, and explicit X2
profile cutouts retain their existing behavior.
API and compatibility
- No class, method, parameter, package subpath, parser input, or project input
is added, removed, or renamed. - Canonical document envelopes and the outline projector's return shape are
unchanged. The correction only suppressespcb_cutoutrows that lack
sufficient source semantics. - Native retained geometry and shared renderer and scene-service inputs retain
their existing shapes.
Performance normalization
- Profile chaining stops as soon as quantized endpoints prove that a path is
closed, avoiding repeated full-path normalization during path growth. - Line and sampled-arc points are normalized once when they enter outline
projection, so source-continuity checks reuse the same finite point data. - These changes preserve the corrected geometry semantics without adding an
example-specific filter or downstream application workaround.
Verification
- Synthetic regressions cover pen-separated mechanical frames, legitimate
source-continuous cutouts, closed contours followed by shared-vertex strokes,
and quantized-degenerate sampled arcs alongside the existing profile suite. - A provided fabrication archive was validated locally without being committed:
canonical and native scene construction each exposed four physical cutouts,
and neither exposed the spurious large rectangular cutout. - Release gates are
npm test,npm run check:format, and an inspected
npm publish --dry-runusing an isolated cache under/private/tmp.
gerber-toolkit 0.4.0
gerber-toolkit 0.4.0
Version 0.4.0 adopts parser-owned CircuitJSON and retained native extension
graphs through the CircuitJSON Toolkit 1.4 ownership boundary. It removes a
redundant defensive graph copy from successful document construction without
changing fabrication geometry, validation, or immutability.
Owned convergence graphs
- The Gerber convergence builder uses
DocumentResult.createValidatedOwned(fields, runtime?)for graphs it has
just constructed and exclusively owns. - Ordinary CircuitJSON model and native extension nodes retain their identities
and are deeply frozen in place. Binary properties continue through the
shared defensive binary boundary. - Raw Gerber and Excellon input remains untrusted and is parsed normally. The
owned path is applied only after the format adapter has produced a new
standard local graph.
API and compatibility
- Parser and project input, options, progress, cancellation, worker, asset, and
source-retention contracts are unchanged. - Successful parsing returns the same
ecad-toolkit.document.v1envelope with
the samemodel,source,extensions,assets,diagnostics, and
statisticsfields. - Canonical fabrication geometry, retained native data, package subpaths, and
shared renderer and scene-service inputs retain their existing shapes. - No class, method, parameter, package subpath, native extension, or renderer
behavior is removed or renamed.
Performance verification
The shared ownership regressions verify retained identity, deep freeze,
bounded extension sealing, mutation isolation, binary protection, and direct
and worker result parity. Gerber performance gates continue to require
deterministic result, clone, structural, size, and retained-heap contracts,
with comparable-environment timing thresholds applied where appropriate.
gerber-toolkit 0.3.0
gerber-toolkit 0.3.0
This coordinated minor release consumes the CircuitJSON Toolkit 1.2 canonical
PCB contract and hardens performance verification across development and CI
hardware.
API and compatibility
- The
circuitjson-toolkitruntime baseline is now^1.2.0, so Gerber
documents interoperate directly with the same validated PCB text, rotated
drilled-pad geometry, and primitive metadata accepted by the other source
toolkits and the 3D viewer. - Existing Gerber root exports, package subpaths, parser parameters, document
envelopes, and extension APIs are unchanged from 0.2.0. - All CircuitJSON 1.2 additions are additive; no Gerber feature is removed.
Release performance
- Comparable benchmark thresholds now account for the executing hardware while
retaining the established absolute and relative regression requirements. - Different environments continue to enforce deterministic result, clone,
fixture, structural, metadata, warmup, sample, median, and retained-heap
contracts without comparing non-equivalent wall-clock timings. - The release checks exercise the comparable timing threshold explicitly,
preventing a fast reference machine from producing false failures on
different CI hardware.
gerber-toolkit 0.2.0
gerber-toolkit 0.2.0
This is the breaking API-convergence release coordinated with
circuitjson-toolkit, altium-toolkit, kicad-toolkit, pcb-scene3d-viewer,
and ECAD Forge.
API changes
- Replaced the root with the exact 17-class common toolkit API.
- Added the common parser, project, renderer, interaction, query,
manufacturing, simulation, 3D, capability, extension, testing, worker, and
renderer-style subpaths. - Changed parsing to
Parser.parse({ fileName, data }, options)and an immutable
ecad-toolkit.document.v1return envelope containing CircuitJSON inmodel. - Changed project loading to dense
{ name, data }entries and an
ecad-toolkit.project.v1return envelope. - Added direct single-ZIP project input, common archive limits, path traversal
rejection, companion assets, progress, cancellation, typed errors, and worker
fallback behavior. - Added
ToolkitCapabilities.inventory()with the shared nine-field row shape. - Existing names and return shapes may change incompatibly in this coordinated
release; the native 0.1.21 surface remains at/extensions.
Feature preservation
- Preserved every 0.1.21 native parser, renderer, interaction, and 3D export at
gerber-toolkit/extensions. - Kept exact Gerber aperture, macro, attribute, polarity, transform, drill, and
routed-slot data in opt-in native extensions. - Added standards-correct modal D operations, combined G01/G02/G03 commands,
G74 center-sign resolution, multi-contour/curved regions, standard aperture
holes, square-ended macro vector lines, macro/block transform bounds, and
Excellon G85 plus M71/M72 handling. - Preserved immutable TF attributes and definition-time TA attribute lifetime;
object-scoped TD no longer erases file attributes. - Added a migration guide for intentional root name and return-shape changes.
CircuitJSON and performance
- Projected representable Gerber/Excellon geometry once into CircuitJSON, which
is used directly by the shared viewer and services. - Added disjoint exact boards/cutouts, plated/non-plated holes and rotated slots,
paste and legend rows, complex BREP apertures, ordered dark/clear composition,
mask-covered/exposed copper, X2FilePolarity, and legacyIPNEG. - Added document-wide X2
TO.C/TO.P/TO.Ncomponent, port, net, and trace
ownership without guessing facts that are absent from the fabrication data. - Kept ordinary pads/traces as compact canonical rows; polygon booleans are
batched and used only when geometry actually requires composition. - Avoided app-side format adapters and repeated native parsing.
- Added owned async byte/asset snapshots, worker execution, exact arc bounds,
bounded archive preflight/CRC verification, linear companion classification,
and absolute plus relative benchmark regression gates.
See Migration from 0.1.21 for exact import changes.
v0.1.21
Release 0.1.21
Changes:
- Maps clear-polarity copper regions to polygon holes in 3D scene output while preserving later dark region redraw order.
- Corrects slotted drill hole rotation relative to matched and drill-only pads.
- Paints separated copper layers as surface artwork and keeps SVG clear masks bounded to the viewbox.
- Refactors flash geometry and SVG clear-mask rendering into dedicated helpers.
Validation:
- npm test: 58 passed.
- npm run check:format: passed.
- npm publish --dry-run --cache /private/tmp/gerber-toolkit-npm-cache: gerber-toolkit-0.1.21.tgz, 48 files, 72.2 kB package size, 372.2 kB unpacked.
Release source:
- Commit: 11ba9df.
- No unmerged local or remote branches were found before release.
v0.1.20
Release 0.1.20 of gerber-toolkit.
Changes:
- Split Excellon drill parsing into a dedicated parser, including routed slots and retained-leading-zero coordinate handling.
- Added solder mask opening classification and propagated mask-opened copper surfaces through SVG and 3D outputs.
- Added outline contour resolution for 3D board shape derivation, including fragmented corner profiles.
- Improved SVG board fill, via-ring rendering, layer view models, clear-polarity masks, and long-arc handling.
- Expanded parser, renderer, parity, and scene3d coverage.
Validation:
- No unmerged local or remote branches found after git fetch --all --prune --tags.
- npm registry version before release: 0.1.19.
- npm test: 52 tests passed.
- npm run check:format: passed after npm run format.
- npm publish --dry-run --cache /private/tmp/gerber-toolkit-npm-cache: gerber-toolkit-0.1.20.tgz, 45 files, 70.2 kB package size, 359.4 kB unpacked size.
- git status --short --branch: clean on main...origin/main.
Commit:
v0.1.19
Summary
- No local or remote branch refs were unmerged into main after
git fetch --all --prune --tags; no branch merges were needed. - Bumped
gerber-toolkitfrom0.1.18to0.1.19because local changes existed and0.1.18was already published on npm. - Added repository fix-quality guidance in
AGENTS.mdcovering universal fixes, avoiding source-specific workarounds, and preserving repo-owned test discipline. - No runtime parser, renderer, loader, SVG, or 3D scene behavior changed in this release.
Package
- Commit:
a02786b6c1d6b44d7e6b38c5855542dad27c7ecc - Tag:
v0.1.19created by GitHub release targeting the commit above. - Dry-run tarball:
gerber-toolkit-0.1.19.tgz - Dry-run package size: 59.1 kB packed, 289.9 kB unpacked
- Dry-run file count: 42 files
Validation
npm view gerber-toolkit version: confirmed published registry version was0.1.18before this release.npm view gerber-toolkit@0.1.19 version: confirmed0.1.19was unpublished before this release.npm test: 38 tests passed, 0 failed.npm run check:format: all matched files use Prettier code style.npm publish --dry-run --cache /private/tmp/gerber-toolkit-npm-cache: completed successfully forgerber-toolkit@0.1.19.