Commit Graph

32 Commits

Author SHA1 Message Date
Seth Hillbrand 0a29c0dea3 Fixup Altium import rectangle handling
Ensure we have positive sizes
Keep rectangles when rotating by multiples of 90

(cherry picked from commit d033f93d89)
2024-06-29 12:17:53 -07:00
Seth Hillbrand 8832b22952 Fixup for Altium pad/fill importer
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

(cherry picked from commit 51eb7aa5b5)
2024-06-29 12:17:53 -07:00
Seth Hillbrand 33b93a3824 Altium import: handle polygons on copper
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.

(cherry picked from commit 7102d9f72a)
2024-06-29 12:17:53 -07:00
Seth Hillbrand b589da63d8 Cleanup Altium text import
Handle inverted text
Correct location for flags
Add mechanics to detect inverted_rect (like text boxes)

(cherry picked from commit b11e030f8f)
2024-06-29 12:17:53 -07:00
Seth Hillbrand 48077d77c4 Altium: Handle textboxes
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

(cherry picked from commit 7e561acf53)
2024-06-29 12:17:53 -07:00
Seth Hillbrand 092ce30b40 Altium: Handle footprint vias
These are treated as pads in KiCad

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18194

(cherry picked from commit 7ea013b96c)
2024-06-29 11:38:36 -07:00
Seth Hillbrand a3d64d604c Silence font replace warnings for libs
When loading schematics/pcbs, notification of font replacements might be
warranted but in libraries, this warning is not helpful and intrusive

(cherry picked from commit 11c6164934)
2024-06-24 12:01:30 -07:00
dsa-t 695505fc71 Fix build error caused by commit 82c2bda52b.
(cherry picked from commit 012d3f098f)

Co-authored-by: Wayne Stambaugh <stambaughw@gmail.com>
2024-06-10 15:02:21 +00:00
Alex Shvartzkop b34dbf58c5 Altium PCB import: don't add thickness to Solid style fills. 2024-06-10 17:32:52 +03:00
Alex Shvartzkop 1fb19c0d81 Altium PCB import: make sure Polygon fill is contained within the outline. 2024-06-10 17:19:43 +03:00
Alex Shvartzkop 3ea314cb9f Altium PCB import: avoid integer overflows when rotating rectangular fills.
Fixes artifacts seen in https://gitlab.com/kicad/code/kicad/-/issues/18156
2024-06-10 01:00:57 +03:00
Alex Shvartzkop ad7bd9b5f8 Revert "Pcbnew, Altium import: Fix issues with hatched zones."
This removed the hatch fill import functionality,
and is no longer needed now that the root cause was found.

This reverts commit 616510aca2.

(cherry picked from commit 80b7f5fcbf)
2024-06-09 22:49:58 +03:00
jean-pierre charras 2a1ef2d09d Pcbnew, Altium import: Fix issues with hatched zones.
- Filled zones using the hatch pattern cannot use the primitives from Altium.
the filled shapes must be rebuilt.
_ Filled zones using the hatch pattern with a very small gap are now converted
to a polygon pattern. Otherwise the calculation time can be very big.

From master branch.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18156
2024-06-09 15:56:57 +02:00
Jon Evans d52e50a97a Altium: avoid crash when imported zone has no fill
Fix https://gitlab.com/kicad/code/kicad/-/issues/18025


(cherry picked from commit 4f3117aea0)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2024-05-18 00:16:22 +00:00
Jon Evans ca16ff05df Altium pcbimport: handle various dimension items, fix dimension_kind enum
(cherry picked from commit ce32dfd077)

e627d587 handle various dimension items, fix dimension_kind enum, this doesn't parse...
e89d1826 fix formating
07686833 change to Reporter for logging
a535d13d remove old comments
554c9565 Update file altium_pcb.cpp

Co-authored-by: Stefan <2252537-stefan_test@users.noreply.gitlab.com>
2024-05-04 16:38:32 +00:00
Jon Evans b8fa10ab2b Add optional reporting of non-KiCad design issues
Also add HTML reporter to PCB side to match schematic
2024-05-04 11:27:22 -04:00
Jon Evans 83be5ba63d Move ALTIUM_PCB to use REPORTER for logging
Change not-yet-supported messages to debug level

(cherry picked from commit e973c15087)
2024-05-01 19:17:09 -04:00
dsa-t 8edfc23679 Altium PCB import: pad thermal spoke angle is 90 deg by default.
(cherry picked from commit 11ba59b690)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2024-04-27 17:27:07 +00:00
Alex Shvartzkop e196f71d58 Support Altium Schematic ASCII import
(cherry picked from commit defcb49ac8)
2024-03-15 01:17:49 +03:00
Jeff Young 12922d9434 Report fp library loading errors with libName & fpName.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16975
2024-02-22 23:37:20 +00:00
Alex 285067dad1 Altium PCB: support polygon id 65534 for keepout tracks on board outline.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16849
2024-02-01 12:15:06 +03:00
Marek Roszko fec57459f3 Use correct arg types in altium arc import error message
Fixes KICAD-6Q1
2024-01-25 07:50:13 -05:00
Alex Shvartzkop 42d8c85f12 Altium PCB import: Models is optional.
Models directory may not exist in older files.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16512
2024-01-14 11:59:49 +03:00
John Beard 60cba81a2e Altium import: Handle 110-byte subrecord5 in Pad6 parser
This appears to happen in some very old (Protel 3.0.0?)
library files.

The example given in issue #16514 always has 0 in the last 4 bytes.
It's not clear exactly what these bytes do, if anything, so
just skip them and assume the holerotation is 0. If it's not 0,
error out - at that point it might be possible to determine what
the value means.

This appears to correctly import the file provided in the issue.
As the license on that file is unclear, we probably can't just
add it as a unit test and it's rather tricky to special up a
binary file test-case for it.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/16514
2024-01-10 00:21:20 +00:00
jean-pierre charras f795e40584 Altium Importer: do not stop import when an item looks bad (happens in old files)
An importer should not stop import when an item just looks strange. Just skip it.
It can happen with old files.
Better do not import one item than import nothing.
2024-01-07 13:10:59 +01:00
Jeff Young 015a050169 Escape error messages for HTML. 2024-01-05 11:03:36 +00:00
Ian McInerney d7fe668d79 Push PCB_IOs to use the base progress reporter instead of per-function 2023-12-27 17:06:23 +00:00
Ian McInerney f8688a922d Unify IO library descriptors 2023-12-27 16:34:59 +00:00
Ian McInerney 743e9d669a Push library management into IO_BASE 2023-12-27 01:21:53 +00:00
Ian McInerney cad91312aa Introduce main base class for all IO loaders 2023-12-26 23:27:11 +00:00
Ian McInerney e6632bb983 Rename PCB IO classes/files 2023-12-24 01:22:21 +00:00
Ian McInerney d8b47d18d3 Initial rename of file plugin infrastructure components to IO 2023-12-24 01:22:21 +00:00