Commit Graph

488 Commits

Author SHA1 Message Date
Thomas Pointhuber 0b176eb5fc altium: Refactor arc parsing to make it reusable for footprint import 2022-01-17 19:56:46 +01:00
Thomas Pointhuber f5720d6e9a altium: Refactor track parsing to make it reusable for footprint import
Also refactor the code to import MULTI_LAYER items really on multiple layers.
2022-01-17 19:54:28 +01:00
Thomas Pointhuber 5aff3ef949 altium: First prototype to parse tracks of a footprint 2022-01-17 19:54:28 +01:00
Thomas Pointhuber f92c1341a2 altium: Move file loading from altium_pcb into altium_*_plugin 2022-01-17 19:54:27 +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
Thomas Pointhuber 05e7f59550 altium: extend documentation so we can parse Altium *.PcbLib files in the future 2022-01-17 19:51:51 +01:00
Jeff Young e61144d45a Finish with EDA_ANGLE. 2022-01-16 21:15:40 +00:00
Jeff Young e84c574830 Some more EDA_ANGLE cleanup. 2022-01-16 19:16:18 +00:00
Jeff Young 9b661aea10 EDA_ANGLE for plotters.
Also fixes a compile error in the PNS Playground.
2022-01-16 01:19:45 +00:00
Jeff Young 07013d00e1 More EDA_ANGLE. 2022-01-14 16:08:19 +00:00
Jeff Young 1b19ff5f42 More EDA_ANGLE changes. 2022-01-14 16:08:19 +00:00
Jeff Young c9487bad18 Move BOARD_ITEM::Rotate() to EDA_ANGLE. 2022-01-14 16:08:19 +00:00
Jeff Young abd3f5bc2b Move footprints to EDA_ANGLE. 2022-01-14 16:08:18 +00:00
Jeff Young d485eb2514 Move pads to EDA_ANGLE. 2022-01-14 16:08:18 +00:00
Jeff Young e048e51f5d Improve SNR of EDA_ANGLE stuff. 2022-01-14 16:08:18 +00:00
Wayne Stambaugh a77b5649cc Footprint editor: fix Eagle plugin footprint library layer mapping bug.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10354
2022-01-12 20:51:45 -05:00
Frank Zeeman f063c00bf1 Fix gr_arc indentation level 2022-01-11 21:03:45 +00:00
Marek Roszko fcfe42d67c Continue the war on wxPoint 2022-01-10 19:52:26 -05:00
jean-pierre charras ac78d51b14 Teardrops: better dialog, and better code 2022-01-10 20:04:41 +01:00
jean-pierre charras d42514ad30 Add code and dialog to create/add/remove teardrops, step 1 2022-01-10 20:04:40 +01:00
Jeff Young 76368af7b9 Font cleanup and bug fixes. 2022-01-09 18:33:53 +00:00
Jeff Young 2fea9e7513 Fix bone-headed copy/paste error formatting gr_poly and fp_poly. 2022-01-09 11:44:06 +00:00
Jeff Young eb58d7e44c Text glyph caches and bug fixes.
1) Unify metrics between stroke and outline fonts
2) Unify handling of rotation and mirroring
3) Bug fixes in collision handling
4) Use of VECTOR2I (instead of VECTOR2D) for world-coordinates
5) Generate outline font overbar with rounded ends and fix rotation
bugs
6) Generate wxEVT_CHOICE events from FONT_CHOICE::SetFontSelection
7) Change text-item PNS SOLIDs to use compound shapes
2022-01-08 16:47:45 +00:00
Ola Rinta-Koski 72b69e8d7f File format changes for fonts. 2022-01-08 16:47:45 +00:00
Steffen Mauch 82f147ecef pcbnew: EAGLE plugin is case sensitive to >VALUE / >NAME
Fixes https://gitlab.com/kicad/code/kicad/issues/10253
2022-01-05 12:51:02 +00:00
Steffen Mauch a5307c6f59 pcbnew: fixing eagle_plugin with empty class names
Fixes #10229
https://gitlab.com/kicad/code/kicad/issues/10229
2022-01-05 12:19:53 +00:00
jean-pierre charras c8d6ad0714 Pcbnew, dimensions fix params incorrectly saved for ortho dim
Fixes #10254
https://gitlab.com/kicad/code/kicad/issues/10254
2022-01-05 10:57:32 +01:00
Marek Roszko 726d873c53 Tear down the wxPoint trigo helpers 2022-01-04 21:23:11 -05:00
Marek Roszko e4dbfcd92d Swap out some wxSize for VECTOR2I 2022-01-04 20:42:27 -05:00
Marek Roszko 98ee6c5f85 Cleanup some wx/gdicmn.h includes 2022-01-04 20:32:27 -05:00
Thomas Pointhuber de39bffd90 altium: Fix board outline import with arcs using SHAPE_LINE_CHAIN instead of a hack 2022-01-04 19:10:33 +01:00
Simon Richter d25fe17b28 Bump minimum required CMake version to 3.11
Signed-off-by: Marek Roszko <mark.roszko@gmail.com>
2022-01-01 21:35:08 -05:00
Marek Roszko 7d671cff1e Scoop up some more wxPoints 2022-01-01 21:06:40 -05:00
Marek Roszko c91d3e3cf9 Remove some more wxPoint 2022-01-01 14:12:20 -05:00
Marek Roszko ea613cf448 Another batch of point changes 2022-01-01 13:17:12 -05:00
Marek Roszko d1552c3fec Some more wxPoint removal 2022-01-01 12:11:21 -05:00
Marek Roszko c4c56de708 Neurotically update position wxPoint usages 2022-01-01 11:55:51 -05:00
Marek Roszko 347e03363a Convert wxPoint/wxSize starting from EDA_RECT usages 2022-01-01 11:30:33 -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 4c6e54b3ea Cleanup. 2021-12-26 17:30:14 +00:00
Jeff Young 0915eb2209 Be more agnostic about specific class hierarchy used to impl dimensions.
Fixes https://gitlab.com/kicad/code/kicad/issues/10123
2021-12-26 17:14:44 +00:00
Jeff Young 5e4a704155 Remove some more duplicated preferences.
Fixes https://gitlab.com/kicad/code/kicad/issues/10112
2021-12-26 13:37:28 +00:00
Jeff Young 09b7e0b72b ADDED Exclude Footprint from Courtyard Requirement.
Fixes https://gitlab.com/kicad/code/kicad/issues/9881
2021-12-24 21:10:28 +00:00
Jeff Young d649b288a6 Swap out autoplace rotation costs for private footprint layers.
Fixes https://gitlab.com/kicad/code/kicad/issues/2291

Fixes https://gitlab.com/kicad/code/kicad/issues/5391
2021-12-24 21:10:28 +00:00
Jeff Young fa908e1f98 Dimensions for footprints.
Fixes https://gitlab.com/kicad/code/kicad/issues/8441
2021-12-24 21:10:28 +00:00
Jeff Young ceceda37cc No more long-lived parsers.
We've had too many bugs from improper re-initialization.

Fixes https://gitlab.com/kicad/code/kicad/issues/9429
2021-12-24 17:11:18 +00:00
Jeff Young f1410f0240 Line styles for PCBNew shapes.
Fixes https://gitlab.com/kicad/code/kicad/issues/2150
2021-12-24 12:36:59 +00:00
Jeff Young ef10b36948 Add mask-to-copper clearance parameter and rename mask margin. 2021-12-24 12:36:41 +00:00
Jeff Young a48867ea01 Solder mask integrity testing.
ADDED DRC test for solder mask aperture bridging copper from different
nets.
ADDED visualization of minimum web width processing for solder masks.
ADDED allow_soldermask_bridges property for footprints.

Fixes https://gitlab.com/kicad/code/kicad/issues/2183

Fixes https://gitlab.com/kicad/code/kicad/issues/1792
2021-12-23 22:31:14 +00:00
Jeff Young 32721755bf Hook up zone-pad connections to custom rules.
ADDED zone_connection constraint.
ADDED thermal_relief_gap and thermal_spoke_width constraints.

ADDED angle override for thermal relief spokes in Pad Properties.

Fixes https://gitlab.com/kicad/code/kicad/issues/4067
2021-12-23 22:30:26 +00:00
Jeff Young 56665b9ca7 Map Altium bold dimension text to a greater text thickness. 2021-12-23 22:17:05 +00:00
Jeff Young 3c0e3610e2 Import Altium radial dimensions to KiCad radial dimensions.
(We converted them to KiCad leaders in 6.0 because we didn't have
radial dimensions yet.)

Fixes https://gitlab.com/kicad/code/kicad/issues/8789
2021-12-23 22:17:01 +00:00
Jeff Young e26341d424 Cleanup. 2021-12-23 20:36:18 +00:00
Jeff Young 2bc86fa0a8 Shapes for schematic.
ADDED arc, circle and rectangle shapes for schematic.  Shapes support
line styles and fill colors.

CHANGED sheet background color in Edit Text & Graphics Properties to
fill color (and it now affects shapes).

Pushed STROKE_PARAMS down into common and moved all shapes to using it
for stroke descriptions.
2021-12-23 20:36:07 +00:00
Jeff Young 4b6bf3095a Radial dimensions.
ADDED radial type dimensions.

Fixes https://gitlab.com/kicad/code/kicad/issues/2056
2021-12-23 19:34:54 +00:00
Jeff Young 0a609dd48d Add footprint library checking to DRC.
Fixes https://gitlab.com/kicad/code/kicad/issues/6821
2021-12-23 19:18:45 +00:00
Seth Hillbrand bd0fbea044 Handle 360° arcs on import as circles
KiCad breaks a bit when dealing with 360° arcs, so convert them to
circles on import.  The break happens when converting to polygons for
viewing, the arc is passed from start->mid->end format to
center->start->angle format.  At 360°, the angle is normalized to 0
2021-12-18 18:44:20 +00:00
Jeff Young a17a58203b Preserve legacy dimension information. 2021-12-17 23:31:37 +00:00
Jeff Young 699ba78b74 Fix legacy (pre-sexpr) board importer.
Fixes https://gitlab.com/kicad/code/kicad/issues/10025
2021-12-17 17:21:31 +00:00
Roberto Fernandez Bautista 8caf62803d Avoid unnecessary newlines and extra spaces when saving polygon shapes
Also minor formatting / code style fixes.
2021-12-03 22:04:55 +00:00
Jeff Young ba6ae4fa9b Kicad has many plugins. This one is for the pcb. 2021-11-25 12:56:46 +00:00
Tomasz Wlostowski 90157db537 PCB_PARSER: add timeout for of 100 ms for refreshing the progress window.
The previously used line number threshold was causing (on some systems) severe slowdown in loading
due to relatively long redraw time of the progress bar window.
2021-11-21 17:33:59 +01:00
Jeff Young 9d587e3e6e Import Eagle rects, polys and circles with 0 width as filled.
Fixes https://gitlab.com/kicad/code/kicad/issues/9639
2021-11-14 23:50:05 +00:00
Thomas Pointhuber 591fbf6383 altium: use arc angle to determine winding direction 2021-11-14 14:45:07 +01:00
Wayne Stambaugh 80c5b1efb1 File formatting improvements and fixes.
Symbol library IDs included the library nickname which is incorrect
and meaningless since it will be overwritten by the symbol library
table code.  This is not a file format change as there are no behavioral
differences.
2021-11-13 12:57:18 -05:00
david-beinder b46b27fe8c Altium import: Avoid illegal filenames when writing embedded 3D models 2021-11-12 14:49:22 +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
Roberto Fernandez Bautista 13f081549c CADSTAR PCB: Use all User layers when mapping documentation layers
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9577
2021-11-10 21:47:22 +00:00
Roberto Fernandez Bautista ad2e780a2c CADSTAR PCB: Correctly load pads with holes
If the THROUGH_HOLE attribute isn't set, it just means that the pads
are only present on one side of the board, but there can still be a
plated / non-plated hole.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9579
2021-11-10 21:21:32 +00:00
Jon Evans 75d75799f7 Move to getters/setters for aux and grid origin
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8836
2021-11-08 22:36:40 -05:00
Seth Hillbrand 6cc6f06a9a Millimetres -> Millimeters 2021-11-08 15:56:51 -08:00
Seth Hillbrand 6569337d27 Haching -> Hatching 2021-11-08 15:56:51 -08:00
Seth Hillbrand 81fc7c71d1 Handle blind/buried vias in Eagle import
Don't sanitize layers before setting type

Fixes https://gitlab.com/kicad/code/kicad/issues/9557
2021-11-08 12:46:54 -08:00
Roberto Fernandez Bautista 6aa7602c32 CADSTAR PCB: Reverse anticlockwise arcs before adding to the chain
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9533
2021-11-05 17:13:02 +00:00
Roberto Fernandez Bautista 8314251fa1 CADSTAR PCB: Force white silkscreen and green soldermask
We don't know the actual colour from the design, but this is the most
common used in the industry.
2021-11-05 17:13:02 +00:00
Roberto Fernandez Bautista b2db24f275 CADSTAR PCB: Don't invert Text Angle for mirrored text
It matches the original cadstar when we don't invert
2021-10-30 18:14:23 +01: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
Jeff Young e12f9a194d Fix Eagle arc importing.
Fixes https://gitlab.com/kicad/code/kicad/issues/9466
2021-10-27 02:36:43 +01:00
Seth Hillbrand 0c99c99e12 Do not assign priorities to rule areas
As noted by @jeffyoung, we shouldn't set priorities to rule areas as
this can expose unexpected issues

Related to https://gitlab.com/kicad/code/kicad/-/issues/7776
2021-10-26 11:16:04 -07:00
Jeff Young 5b9519da6c Fix arc formatting in Fabmaster import. 2021-10-26 17:52:10 +01:00
Seth Hillbrand d44e0ab765 Limit use of non-copper layers
When importing, we should not use Eco1 for other purposes as the
importer uses it to place unknown layer objects.  We also need to avoid
placing objects on the courtyard layers that do not relate to the layer
purpose in DRC

Fixes https://gitlab.com/kicad/code/kicad/issues/9442
2021-10-22 12:31:11 -07:00
Jeff Young 57f907f6e7 Make sure PCB_PARSER is fully initialized between footprints.
Fixes https://gitlab.com/kicad/code/kicad/issues/9424
2021-10-19 17:14:04 +01:00
Seth Hillbrand 10ac675905 Fix shadowing 2021-10-18 09:00:24 -07:00
Roberto Fernandez Bautista 99442350a4 CADSTAR PCB: Fix loading of arc tracks following recent PCB_ARC changes
We no longer have any knowledge of the original start/end of the arc,
since SetArcAngleAndEnd swaps the start and end to ensure the arc is
always clockwise at the end.

Adds a method EDA_SHAPE::EndsSwapped() to notify whether the start/end
point of the shape were swapped.
2021-10-17 17:57:51 +01:00
Roberto Fernandez Bautista e867a4fd27 CADSTAR PCB: Fix Zone fill priorities
The algorithm now correctly determines fill priorities when the zone
outlines are close together and within the minimum clearance between
zones.
2021-10-16 21:50:56 +01:00
Jeff Young f9861b4a6c Finish arc rework and push out to file formats. 2021-10-15 12:45:43 +01:00
Jeff Young 9b9e379aa0 Overhaul arc internal model to not over-specify information. 2021-10-15 12:45:43 +01:00
Jeff Young 8b08c9e53f Shorter names before things get out of hand.
Also, remove comments indicating CURVE is a Bezier.  Just call it a
BEZIER.
2021-10-15 12:45:43 +01:00
Jeff Young a41944020d Push most of PCB_SHAPE impl down in to EDA_SHAPE. 2021-10-15 12:45:43 +01:00
Roberto Fernandez Bautista 43e59b0ea7 CADSTAR PCB: Correctly handle associated pad ids and PCB Only pads
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9372
2021-10-11 18:30:20 +01:00
Roberto Fernandez Bautista 7a71ebf9ac CADSTAR PCB: Load all three net properties into a single Netclass
The final netclass name will be a bit long but it will allow for custom
DRC rules to individually target each of the three properties available
in CADSTAR:
- Route Code (which specifies width of the track in min, max, opt)
- Net class (only used in signal integrity analysis)
- Spacing class (for specifying clearance requirements between classes)
2021-10-10 22:16:08 +01:00
Roberto Fernandez Bautista ac3ade874e CADSTAR PCB: Set Copper-to-Hole clearance as 0
Testing suggests that CADSTAR doesn't actually have any clearance to the
hole (other than electrical clearance to the barrel of the padstack/
viastack).

This removes a large amount of DRC violations on imported designs.
2021-10-10 00:20:13 +01:00
Roberto Fernandez Bautista eb7d0fdf8a CADSTAR PCB: Use board clearance + additional isolation as zone clearance
Copper-to-copper clearance is too onerous and results in large amount
of DRC errors for the majority of imported designs.
2021-10-10 00:18:36 +01:00
Roberto Fernandez Bautista f4ff01a5ab CADSTAR PCB: Copy default netclass settings when creating new ones
Ensures that the global clearance is preserved in the newly created
netclass.
2021-10-09 23:10:55 +01:00
Roberto Fernandez Bautista 8f74085ca4 CADSTAR PCB: Handle older boards without construction layers
Use KiCad default stackup for older CADSTAR boards that do not
define any dielectric layers between the electrical layers.

Also fix default stackup calculation to ensure finished board thickness
is 1.6mm
2021-10-09 21:26:16 +01:00
Roberto Fernandez Bautista 33a3cfc87b CADSTAR PCB: Update Board Design Settings to notify that a stackup exists
Also update thickness of the PCB

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9307
2021-10-09 20:33:14 +01:00
Roberto Fernandez Bautista e80a1c2679 CADSTAR PCB: Don't load items on invalid layers
This was happening in two cases:
- Loading documentation symbols (CADSTAR on purpose defines these in an
  invalid layer)
- When an item was in a "layer set" such as ALLELEC or ALLLAYER - need to
  make sure we remove the copper layers that are not active in the design
2021-10-09 20:07:23 +01:00
Roberto Fernandez Bautista 677166f0b8 CADSTAR PCB: Rule Areas have zero width
Cadstar areas have a line width but this is only for display purposes.
Instead CADSTAR uses the center line when determining whether a DRC
violation occurred.
2021-10-08 21:27:32 +01:00