This still leaves a few things out in the cold,
such as hit-testing and polygon generation.
But at least it allows us to plot with a default
font.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19031
(cherry picked from commit e230d5164d)
Handle Altium project file format
Parse individual schematic files and layout files
Create top-level schematic file
Link imported UUIDs between schematic symbol and footprints based on
refdes
Create KiCad project
Map Altium layout layers between KiCad
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2117
(cherry picked from commit e81956f292)
We use IN for INCH as units, but IN is defined in a Windows header
(cherry picked from commit b0fe4df3c5)
(cherry picked from commit 0acdabd1eb)
(cherry picked from commit eaa1e6d594)
Altium stores (or can store) full information about the absolute
location of libraries for each footprint in their board files. Since
KiCad only stores an alias, we have no place to keep the full path.
Just keeping the filename should be enough for most cases and still
allows the user to disambiguate manually after import without crowding
the UI.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15593
Recommendation is to avoid using the year nomenclature as this
information is already encoded in the git repo. Avoids needing to
repeatly update.
Also updates AUTHORS.txt from current repo with contributor names
While there is an example where the default text frame justification is center-center,
in other cases it should be left-bottom, but we don't know what controls this yet.
An example where text frames should be imported with center-center justification:
830d51b80c/RK3328.PcbDoc
But in "mb1897-bdp.zip" from https://gitlab.com/kicad/code/kicad/-/issues/18784
text frames should use left-bottom justification.
(cherry picked from commit 86f122416b)
CHANGED: PCB file format now supports saving/loading complex padstacks
CHANGED: PTH pads are now rendered per copper layer in the copper color;
the PTH pad color is no longer used.
ADDED: support for importing complex pad stacks from Altium PCBs
Enforce padstack-aware access to pad properties across KiCad
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8182
F_Cu = 0
B_Cu = 2
Remaining internal copper layers are even and incrementing
Non-copper layers are odd and incrementing.
This means that we can no longer do things like:
for( PCB_LAYER_ID layer = F_Cu; layer <= B_Cu; ++layer)
Instead, we have the class LAYER_RANGE:
for( PCB_LAYER_ID layer : LAYER_RANGE( F_Cu, B_Cu) )
Similarly, gt/lt tests should not refer to the integer value of the
layer. We have functions such as IsCopperLayer to test whether a layer
is copper or not.
When using the connectivity RTree, the third dimension is layer, so we
provide B_Cu with the special INT_MAX value, ensuring that elements
between F_Cu and B_Cu will be identified. There is a new, special
function GetBoardLayer() for interfacing with CN_ITEMS
Similarly, PNS layers remain unchanged and sequential. A set of
interface functions is provided to map PNS layers to Board layers and
back. This allows the PNS_LAYER_RANGE to function as expected
When the italic or bold nature is changed, text using outline fonts may
need to change its font. Add this to the SetItalic/SetBold functions.
Also add a counterpart SetItalicFlag function (following SetBoldFlag)
when you only need to set the flag (e.g. when importing or changing
everything in the text properties dialog).
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18592
Altium Circuitmaker doesn't always put a file name with the footprint,
so we take the model file name if the footprint model filename is blank.
Also adjust the correct rotation for the models when embedded into
footprints
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16976
Sometimes we don't get the data elements in order. Use the stream name
to ensure we have the correct model.
Also give the parser a bit more memory to work with, avoiding unneeded
resizes
Schematics, symbols, boards and footprints all get the ability to store
files inside their file structures. File lookups now have a
kicad-embed:// URI to allow various parts of KiCad to refer to files
stored in this manner.
kicad-embed://datasheet.pdf references the file named "datasheet.pdf"
embedded in the document. Embeds are allowed in schematics, boards,
symbols and footprints. Currently supported embeddings are Datasheets,
3D Models and drawingsheets
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6918
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2376
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17827
We still don't know why some Altiums seem to save 0s for the textbox
size when dealing with text strings and some still save values. There
must be another flag to differentiate between text strings and text
boxes but we haven't found it yet. But until then, we still need to
link the correct string with the textbox that we generate and suppress
the border
The previous commit merged pads with copper areas. This was appealing
but broke when the pad and the area were meant to have different
size/shape technical layers. Small pads = Small paste. Instead, we do
not merge the pads but we assign them to have the appropriate nets in
KiCad, allowing the same effective result but keeping the technical
layers correct
In Altium, copper polys will be connected automatically to their
associated pads. In KiCad, we need to do the equivalent when parsing,
which is to combine the joining copper into the underlying pad. We also
don't want to treat copper polys as proxy pads without the original
anymore.
Also, corrects a minor issue with the text width calculation where
Altium calculates centerline to centerline but KiCad text heights are to
the edge of the stroke font. Need to still do better adjustments for
the various altium stroke fonts
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9468