Commit Graph

136 Commits

Author SHA1 Message Date
Alex Shvartzkop e892405738 Altium PCB import: read and apply TrueType font names to text. 2023-07-04 13:29:42 +03:00
Jeff Young 8bd21edd8a Fix capitalization of text vars for Eagle importer.
Also fixes the test gold files to expect the correct variable
references.
2023-05-06 23:49:10 +01:00
Jeff Young 8fe02ee83c Handle Eagle user-defined attributes.
(We map these to text variables.)

Fixes https://gitlab.com/kicad/code/kicad/issues/13798
2023-05-06 21:10:34 +01:00
qu1ck 0c049eccc7 Fix a bunch of compiler warnings 2023-04-11 17:01:30 +00:00
Jeff Young 13e79af8a0 Eagle template footprints don't actually belong to board.
Set their parent to nullptr before deleting (as the board may have
already been deleted).

Likely fix for Sentry KICAD-79.
2023-04-04 14:18:49 +01:00
Roberto Fernandez Bautista c5362c9b0a CADSTAR: Parse PINNOOFFSET and PINNOANGLE 2023-03-16 21:07:08 +01:00
Roberto Fernandez Bautista a5dc528c88 CADSTAR: Fix edge case in parts grammar (symbol name can be quoted) 2023-03-16 21:07:08 +01:00
Roberto Fernandez Bautista 59d88e1871 CADSTAR Parts: Add parsing of hierarchy tree 2023-03-16 21:07:07 +01:00
Roberto Fernandez Bautista b70fe88145 CADSTAR Parts: Fix parsing of hidden pins (possible for several pins per net!) 2023-03-16 21:07:07 +01:00
Roberto Fernandez Bautista 6ab2112135 ADDED: CADSTAR Parts Libraries (.lib) 2023-03-16 21:07:07 +01:00
Roberto Fernandez Bautista 8f83f27336 CADSTAR SCH: Refactor loading of symbols out of loading part info 2023-03-16 21:07:06 +01:00
Roberto Fernandez Bautista c34207b726 CADSTAR: Remove wxPoint + improve formatting 2023-03-16 21:07:06 +01:00
Roberto Fernandez Bautista f45ab30fa6 Add parsing for symbols and pins (Parser now complete) 2023-03-16 21:07:05 +01:00
Roberto Fernandez Bautista e2a4d58e8f Extract CADSTAR PIN_TYPE and PIN::POSITION into a separate header 2023-03-16 21:07:04 +01:00
Roberto Fernandez Bautista 379e3b2fbb Add CADSTAR Parts Library (.lib) parser and qa tests 2023-03-16 21:07:04 +01:00
Roberto Fernandez Bautista b03366c9e8 Fix CADSTAR importer memory leaks
We were leaking the xml tree when throwing exceptions
2023-02-27 23:57:39 +01:00
Roberto Fernandez Bautista 698d0b7e92 CADSTAR Sch: Fix loading of graphical arc shapes
Correctly load arc shapes as real arcs instead of approximating now that
v7 supports graphical arcs in the schematic.

Also fix calculation of arc geometry for ccw arcs.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14101
2023-02-26 19:46:34 +01:00
Marek Roszko 30a49462fe Fix crash parsing cadstar
Fixes sentry KICAD-B2
2023-02-19 08:06:35 -05:00
Marek Roszko aacc9746e3 Yeet the last of wxSize/wxPoint to stop leaking gdicmn everywhere 2023-02-18 22:57:18 -05:00
Marek Roszko 4665823089 Turn on and fix MSVC compliance mode issues
We want /permissive- to enable debug performance improvements in MSVC 17.5+.
This flag is also default under C++20 so we'll have to deal with these compile issues anyway at some point in the future.

In particular, MSVC becomes pedantic about ternary types.
See https://learn.microsoft.com/en-us/cpp/build/reference/permissive-standards-conformance?view=msvc-170#ambiguous-conditional-operator-arguments

MSFT cites https://cplusplus.github.io/CWG/issues/1805.html
2023-02-12 16:30:37 -05:00
Dag Lem cff0560088 Eagle schematic import: Handling of escaped text 2023-01-18 12:33:36 +00:00
Jeff Young ea1d7c5d97 Update Eagle imported variable mapping to better match Eagle output.
Fixes https://gitlab.com/kicad/code/kicad/issues/13541
2023-01-17 13:43:47 +00:00
Jeff Young 9315e885ee Substitute variables in imported symbol text.
Also allows mulit-line text items to be imported.

Fixes https://gitlab.com/kicad/code/kicad/issues/13541
2023-01-16 16:01:45 +00:00
Jeff Young ca1fb732c8 Share Eagle var substitution between board and schematic importers.
Fixes https://gitlab.com/kicad/code/kicad/issues/13541
2023-01-15 22:27:19 +00:00
Roberto Fernandez Bautista 99d02ac7c0 CADSTAR SCH: Load symbol shapes with correct fill state
Changes architecture of importer to use SHAPE_LINE_CHAIN.

For now lets just load symbol shapes like this, but we could update code
for all other loading operations (also in PCB).

FIxes https://gitlab.com/kicad/code/kicad/-/issues/8060
2023-01-10 22:28:01 +01:00
Roberto Fernandez Bautista ee6e86d1db Add conversion from CADSTAR SHAPE to SHAPE_POLY_SET 2023-01-10 22:28:01 +01:00
Jeff Young f17ddf5c88 Terminate overbar notation correctly.
Fixes https://gitlab.com/kicad/code/kicad/issues/13438
2023-01-08 20:08:53 +00:00
Seth Hillbrand f1261e71d4 Replace boost::optional with std::optional 2022-08-25 15:50:47 -07:00
Marek Roszko f695ae5522 Generate const keyword_hash maps at compile time
Or else the map gets pointlessly recreated during footprint loading thousands of times
2022-08-09 00:56:49 -04:00
luz paz 79fa911e0e Fix various typos
Found via `codespell -q 3 -S *.po,./thirdparty,./Documentation/changelogs -L aactual,acount,aline,alocation,alog,anormal,anumber,aother,apoints,aparent,aray,ba,busses,dout,einstance,leaded,modul,ontext,ot,overide,serie,te,,tesselate,tesselator,tht`
2022-07-21 16:31:41 +00:00
Roberto Fernandez Bautista 41bf397d24 CADSTAR Schematic: Fix parsing of ATTRCOLORS.
Apparently there can be a `INVISIBLE` token. Unclear what it means,
but lets read it anyway
2022-06-03 23:07:12 +02:00
Jeff Young 739f4d0a1e Improvements to Eagle dimension importing.
1) Import leaders
2) Drop radius and angle dimensions
3) Import dimension text sizes
4) Correctly interpret which side dimension offset is on
5) Correclty handle offsets for non-cardinal dimensions

Fixes https://gitlab.com/kicad/code/kicad/issues/10763
2022-04-12 15:47:39 +01:00
Jeff Young cf33cfcad1 Round Altium unit conversions to nearest 10nm.
Fixes https://gitlab.com/kicad/code/kicad/issues/6462
2022-03-22 23:22:44 +00:00
Thomas Pointhuber 8ef7252330 altium: Don't use string concatenation for paths pointing in the compound file
* std::vector do not need to be split apart again
* supports backslash in footprint names
2022-02-19 16:46:20 +01:00
Marek Roszko ca7840334c Mark some limits as constexpr
gcc doesn't need it and computes during compile regardless, but experimenting in godbolt, both clang and MSVC actually do need it or else it's partially computed at runtime
2022-02-04 07:50:13 -05:00
Thomas Pointhuber 5aff3ef949 altium: First prototype to parse tracks of a footprint 2022-01-17 19:54:28 +01:00
Thomas Pointhuber 0129e49b79 altium: Introduce new ALTIUM_COMPOUND_FILE object to handle file opening and searching for streams at a central place 2022-01-17 19:54:26 +01:00
Thomas Pointhuber 2cc9517cfd altium: Allow extraction of names of footprints stored in *.PcbLib file
See: https://gitlab.com/kicad/code/kicad/-/issues/10274
2022-01-17 19:51:51 +01:00
Thomas Pointhuber c6504628f0 altium: Fix Compound File Reader which returned wrong entries
It was possible that we confuse multiple files with the same name. This should not be that relevant for board and schematic import, but is important for library import!
2022-01-17 19:51:51 +01:00
Jeff Young e61144d45a Finish with EDA_ANGLE. 2022-01-16 21:15:40 +00:00
Marek Roszko 726d873c53 Tear down the wxPoint trigo helpers 2022-01-04 21:23:11 -05:00
Marek Roszko ea613cf448 Another batch of point changes 2022-01-01 13:17:12 -05:00
Marek Roszko c4c56de708 Neurotically update position wxPoint usages 2022-01-01 11:55:51 -05:00
Jeff Young 86cb57f4a7 Cherry-pick TEXT_ATTRIBUTES and EDA_ANGLE from rockola/kicad-strokefont 2021-12-28 22:15:20 +00:00
Jeff Young b84a85f648 Cleanup dead code and stale TODOs. 2021-12-24 21:10:28 +00:00
Jeff Young e26341d424 Cleanup. 2021-12-23 20:36:18 +00:00
david-beinder a9b4465703 Altium import: Use UTF16 string table for PCB texts
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7948
2021-11-12 14:49:22 +00:00
Jeff Young 4fe025909d Fix centered rotated text in Pcbnew Eagle importer.
Fixes https://gitlab.com/kicad/code/kicad/issues/9466
2021-10-27 14:38:42 +01:00
Roberto Fernandez Bautista 4d5a344ed5 CADSTAR: Reduce slowdown from progress reporting
Only report progress when it changes by more than 1%
2021-10-17 17:57:51 +01:00
Jeff Young f66654247a Read netclasses when importing Eagle projects.
Also creates a DRU file with the various netclass-to-netclass
clearance rules from the Eagle clearance matrix.

Fixes https://gitlab.com/kicad/code/kicad/issues/1774
2021-09-20 12:38:56 +01:00