Expand description
Parameterized, source-preserving edits for reusable KiCad library items.
Applications choose property, font, layer and resource policies. These operations neither discover files nor select a preferred model format.
Structs§
- Embedded
Model Edits - Exact edit scope, including intentionally dropped unsupported models. Nothing is removed by type, format, filename or URI-prefix inference. All indices refer to the original Source before any edits are applied.
- Footprint
Artwork - Only the supplied typed artwork is appended. Coordinate frame, layers, dimensions, text, styling and actual UUIDs remain caller choices.
- Footprint
Edits - Direct standalone-footprint edits. Every choice is supplied by the caller.
- Footprint
Field Text - Explicit Source field role plus its actual authored text/presentation.
Presentation uses the same validation as
AuthoredFootprintText, including visible text only; no Reference/Value string or formatting is inferred. - Kept
Embedded Model - Exact positions in
FootprintView::models()andembedded_files(). The caller selects the pair after inspecting the actual payload; this operation verifies both original Source values exactly against the supplied receipts. The caller owns pairing policy; this is not a file-format proof. - Library
Edit - The actual output and the number of changed Source forms, not a fidelity receipt, model count or permission to publish a file.
- Property
Font - Replace the complete font child on a selected property, leaving its other effects intact. No font dimensions or property names are implicit.
- Symbol
Library Edits - Explicit complete-library property edits.
Nonekeeps all property names;Some(&[])removes every property. Empty edit lists are no-ops. - Symbol
Property Update - An explicit update or insertion selected by the caller.
- Symbol
Property Value - One direct Source property, including its exact decoded spelling.
Enums§
- Footprint
Field Text Kind - Actual legacy
fp_textfield roles, distinct from graphical properties.
Functions§
- append_
footprint_ artwork - Validate artwork through the existing typed Source authoring operation and append its emitted forms without rewriting existing footprint bytes. This creates no inferred bounds, labels, projection or model geometry.
- edit_
footprint - Edit only the explicitly requested direct footprint fields.
- edit_
footprint_ embedded_ models - Rename the explicit model/file pair and remove exactly the listed model references and embedded file forms. Unselected fonts, other resources, external references and unknown forms remain byte-for-byte intact. The renamed payload, checksum and model placement also remain byte-for-byte intact. Empty resource wrappers are retained rather than sweeping unselected forms.
- edit_
symbol_ library - Apply the same explicit policy to every symbol in a complete library, including nested symbol forms. Unselected source bytes are unchanged.
- materialize_
symbol_ unit - Materialize the selected positive unit as unit 1 in one symbol’s exact inheritance chain. Unit 0 and all body styles survive. Other recognized positive units are removed; unknown/non-owned forms and unrelated library members retain their exact bytes. Source identifiers are exact decoded names; no implicit aliases or case-fold lookup are performed.
- normalize_
nonpositive_ direct_ pad_ sizes - Repair only direct
(pad ... (size x y))fields. If either axis is nonpositive, both axes become the explicitly supplied positive dimensions. Missing size fields and nested padstack sizes are left unchanged. - remove_
footprint_ layer_ forms - Remove any direct footprint form having a direct layer child matching an exact layer or literal prefix supplied by the caller. This deliberately includes properties and extension forms on those selected layers. Every other byte, including unknown forms and embedded payloads, stays unchanged. Empty layer/prefix sets are a no-op; no layer patterns are implicit.
- symbol_
property_ values - Read only direct properties of one uniquely and exactly named root symbol. Duplicates are returned in Source order so the caller cannot mistake an ambiguous property for a unique match. Inherited properties are not merged.
- upsert_
symbol_ properties - Prepare every requested edit before patching one selected symbol. Existing property values are byte patches; inserted properties use the existing typed symbol authoring validator and writer. Unknown and unselected bytes survive, including other members of a complete library.