Commit Graph

12983 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 2defd8d911 Move show-bounding-boxes to a tool on the toolbars. 2022-01-17 11:56:40 +00:00
Jeff Young e61144d45a Finish with EDA_ANGLE. 2022-01-16 21:15:40 +00:00
Jeff Young 4b7fe5bce3 EDA_ANGLE cleanup. 2022-01-16 21:15:40 +00:00
dsa-t bc1ff6756f Cross-probing/selection for multiple items (SCH->PCB) 2022-01-16 20:29:03 +00:00
jean-pierre charras 21cdc5aec0 make dialog_teardrop_base translatable. 2022-01-16 21:09:05 +01:00
Jeff Young e84c574830 Some more EDA_ANGLE cleanup. 2022-01-16 19:16:18 +00:00
jean-pierre charras ef6ce972d6 Fix missing filtering of teardrop targets. 2022-01-16 17:20:48 +01:00
Wayne Stambaugh c154e85ebd Footprint editor: use most recently used path on footprint import.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10418
2022-01-16 09:47:08 -05:00
jean-pierre charras 5b0527bdfe Teardrop: add separate settings for round, rect shapes and tracks 2022-01-16 10:24:23 +01: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 1539fa5af2 Move SHAPE_ARC to EDA_ANGLE. 2022-01-16 01:19:45 +00:00
hogthrob b605d6d9ae Fix issue with DXF plot not plotting small drill marks
Code was missing to convert mm to internal units for small drill mark size  in PlotLayerOutlines (which is only used in DXF Plot).  All other plot formats like PDF use PlotStandardLayer which does not have that problem.
2022-01-15 13:04:50 +00:00
Jeff Young 3f98769a77 More EDA_ANGLE.
Includes bug fix for catastrophic error in Add() for converting to
radians.

Includes bug fixes for the fact that the pcbnew test can't seem to
find the ANGLE_* objects (getting all 0's instead).
2022-01-15 01:30:04 +00:00
Jeff Young 0967cc82e2 Exclude rules which match no enabled layers.
Fixes https://gitlab.com/kicad/code/kicad/issues/10227
2022-01-15 01:30:03 +00:00
Seth Hillbrand 22a77d3556 Move EDA_ANGLE to KiMath lib
KiMath should only depend on itself not on other elements in the tree
2022-01-14 17:12:24 -08:00
jean-pierre charras bc77a1e2dd drc_test_provider_library_parity: fix a crash due to a incorrect if()...else() logic.
The incorrect logic allowed execution of the else sequence when it should not be executed.
2022-01-14 18:17:27 +01: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 037dfb6e01 Move FP_TEXT::KeepUpright() to EDA_ANGLE. 2022-01-14 16:08:19 +00:00
Jeff Young 5176512de3 Move PCBNew rotation increment to EDA_ANGLE. 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
Jon Evans d3d2ebe349 Do not check key states for non-key events in TryBefore
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10127

(cherry picked from commit 2306d00c89)
2022-01-13 22:31:39 -05:00
Jon Evans eac1936303 PNS: Do not clear layer pairs when importing new sizes
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10225

(cherry picked from commit 20bbf9b179)
2022-01-13 20:38:08 -05:00
Jon Evans 3011ae1d51 PNS: Do not allow smart pads when in 90-degree mode
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10386

(cherry picked from commit cf4d46b24d)
2022-01-13 20:38:01 -05:00
qu1ck 33a4c9b08e FOOTPRINT::GetProperty() swig extension 2022-01-13 21:08:52 +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
Tomasz Wlostowski 79fe0bf456 router: use VIA::PushoutForce() for via push force calculation in the shove algorithm
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10317
2022-01-13 00:43:27 +01:00
Tomasz Wlostowski 4d0a317e3d router: fix via force propagation for vias where hole clearance > copper clearance 2022-01-13 00:42:50 +01:00
Tomasz Wlostowski 2aee47487a pcbnew: consider worst case hole-to-hole clearance in GetBiggestClearanceValue() 2022-01-13 00:42:08 +01:00
dana 8373180cbb Handle Unicode clipboard data in pcbnew and symbol editor
Fixes #10323
2022-01-12 17:15:47 +00:00
jean-pierre charras cf11abda3d Fix test_drc_regressions.cpp: disable tests that need a footprint library
DRCE_LIB_FOOTPRINT_ISSUES and DRCE_LIB_FOOTPRINT_MISMATCH imply a library
but the test cases do not have a library.
2022-01-12 15:57:41 +01:00
jean-pierre charras ea3efac2b6 drc/drc_test_provider_library_parity.cpp: protect against null pointer use.
qa tests, test_solder_mask_bridging.cpp: filter not relevant DRC tests
2022-01-12 14:41:11 +01:00
Jeff Young 8c6c87eaf4 Separate footprint lib issues from footprint mismatch issues.
Fixes https://gitlab.com/kicad/code/kicad/issues/10132
2022-01-11 22:28:24 +00:00
Jeff Young 6ccfec0553 Layer handling for copper sliver exclusions.
Fixes https://gitlab.com/kicad/code/kicad/issues/10147
2022-01-11 22:28:24 +00:00
Frank Zeeman f063c00bf1 Fix gr_arc indentation level 2022-01-11 21:03:45 +00:00
Roberto Fernandez Bautista de7158b80e Include Footprints within Groups when re annotating duplicates
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10329
2022-01-11 20:51:03 +00:00
Jeff Young 267eca28cd Font support for global edit text & graphics dialogs. 2022-01-11 15:34:24 +00:00
Jeff Young 8f7d2dd06a More VECTOR2D -> VECTOR2I and wxPoint cleanup. 2022-01-11 14:20:14 +00:00
Seth Hillbrand acf2e1601c Fix copy-paste error
(cherry picked from commit 8dca61ce9c)
2022-01-11 06:08:38 -08:00
Seth Hillbrand 70b0ac15ea Handle arcs in global track width changes
Also add defensive code against invalid indices

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

(cherry picked from commit bd7841bf96)
2022-01-10 17:20:22 -08:00
Marek Roszko fcfe42d67c Continue the war on wxPoint 2022-01-10 19:52:26 -05:00
Jeff Young 21790fcab7 Fix a pair of dereference-freed-pointers in DRC.
Fixes https://gitlab.com/kicad/code/kicad/issues/10335
2022-01-10 21:06:03 +00:00
jean-pierre charras 4cdfd14f25 Fix a compil issue. 2022-01-10 21:03:22 +01:00
Seth Hillbrand fade00a2b8 Remove default hotkey for toggle zone display
It is too easy to accidentally hide your zones and the 'A' hotkey is
intuitively mapped to Add Footprint, to match Add Symbol in eeschema.

This won't change current hotkey customizations but will help prevent
future user error.  Users can still map the action to a hotkey if the
new toggle is useful to their workflow

(cherry picked from commit 4d899d7820)
2022-01-10 11:52:41 -08:00
jean-pierre charras ac78d51b14 Teardrops: better dialog, and better code 2022-01-10 20:04:41 +01:00
jean-pierre charras 5644f236d8 Allow teardrops only if advanced config define AllowTeardrops=1 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
Seth Hillbrand 6165fd2be5 Fix FP circle validity check
Radius is encoded by m_endX

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

(cherry picked from commit 4907b90215)
2022-01-10 10:54:45 -08:00
jean-pierre charras cfe93e34a2 PCB_BASE_FRAME::FocusOnItem(): avoid extremely long calculation time for zones.
The algo used to calculate a focus point on a zone can be *extremely* time
consuming when using the filled areas in zone (can be matter of minutes and more).
So we use now only the zone outlines usually having not a lot of vertices.
2022-01-10 18:14:19 +01:00
Jeff Young 73a2984963 Fixes for rotated footprint text. 2022-01-10 15:30:19 +00:00
Jeff Young 236feeb592 Cleanup GRText APIs, 3D Viewer <-> board APIs, and Plotter APIs.
Also fixes a bug where outline fonts weren't being handled for footprint
text in 3D Viewer, and a copy/paste error in stroke font handling for
both PCB and footprint text in 3D Viewer.

Fixes https://gitlab.com/kicad/code/kicad/issues/10319
2022-01-10 14:17:11 +00:00
Jeff Young 2563518f3a Fix compile error. 2022-01-10 14:05:21 +00:00
jean-pierre charras c24985e8cf drc_test_provider_sliver_checker.cpp: skip very small vertices when testing.
Very small vertices (length <= 2 or 3 iu) are frequent in filled areas, and
create false positive detections because one cannot calculate a meaningful
orientation of these vertices.
2022-01-10 11:50:29 +01:00
Jeff Young 7d032f9c2f Outline font rendering for Cairo, plotter, printer and 3D viewer.
Fixes https://gitlab.com/kicad/code/kicad/issues/10319
2022-01-10 01:54:28 +00:00
Jeff Young 76368af7b9 Font cleanup and bug fixes. 2022-01-09 18:33:53 +00:00
Wayne Stambaugh f379c49084 Pcbnew: honor footprint exclude from BOM setting.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10297
2022-01-09 11:27:34 -05: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 3c60b92472 Add custom rule examples from Martin Straub. 2022-01-09 11:34:20 +00:00
Jon Evans 974a66ddec Ensure LIB_TREE cleans up while frame still exists
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10266

(cherry picked from commit 76f21d950d)
2022-01-08 17:32:42 -05:00
Jeff Young e3328e54c4 Fix view switcher on Mac.
Solution for MSW/GTK still isn't great.
2022-01-08 22:23:44 +00:00
Jeff Young 27c967421c Commenting and "auto" reduction. 2022-01-08 16:47:45 +00:00
Jeff Young aef2a3fca4 Default font for eeschema. 2022-01-08 16:47:45 +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
Jeff Young 72340fcee2 Implement router and DRC collisions for outline fonts. 2022-01-08 16:47:45 +00:00
Jeff Young a2030a5956 GUI for font selection. 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
jean-pierre charras 9c29cc945c prepare teardrops, round 2 2022-01-08 16:56:41 +01:00
jean-pierre charras 2b20a58615 Zone fill: fix an issue that uses thermal spoke width as thermal gap.
Fixes #10300
https://gitlab.com/kicad/code/kicad/issues/10300
2022-01-08 14:24:14 +01:00
jean-pierre charras 33dbe92deb drc_test_provider_mechanical_clearance: add missing handling of SHAPE_T::RECT
test_ee_item.cpp: add missing call to ClearFieldsAutoplaced();
2022-01-08 10:49:47 +01:00
Seth Hillbrand 4a16c603e9 Don't bind to Alt+Tab
The Alt key is not usable by programs under Windows and Alt+Tab is
reserved on both MSW and Linux.  Instead, we use the Shift modifier to
determine which preset to open
2022-01-07 15:35:46 -08:00
Seth Hillbrand 26c0a78947 Plot pads in layer color
v6 pads are not allowed to be a different color from the rest of the
copper layer, so don't query the GAL layer for a color

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

(cherry picked from commit bfca928900)
2022-01-07 08:56:22 -08:00
jean-pierre charras 53770fec68 Ensure thermal spoke widths are smaller than the pad size (fix a regression)
This is needed to create good thermal reliefs, and ensure the DRC about
thermal spoke count works.
Fixes #10246
https://gitlab.com/kicad/code/kicad/issues/10246
2022-01-07 16:38:27 +01:00
jean-pierre charras 534d635dd4 DIALOG_DRC: avoid use UNDEFINED_LAYER when select or activate a physical layer.
Although strangely it did not create issues on Linux, it does not work on Windows
2022-01-07 12:53:10 +01:00
Seth Hillbrand 4f874057ab DRC scripting: load project from board if possible
s_SettingsManager is not always initialized when the WriteDRCReport is
run.  We should first attempt to extract the project from the actual
board being checked.  Failing that, we fall back to the static settings manager and then exit if we don't have a project associated.

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

(cherry picked from commit 78e737b9d8)
2022-01-06 11:51:05 -08:00
jean-pierre charras 7fa451dc93 Thermal reliefs: fix incorrect calculation
commit eeef655 did not fix the calculations.
2022-01-06 09:00:29 +01: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 eeef65533a Pad Thermal Reliefs: fix spoke incorrect angle for rotated pads.
Fixes #10251
https://gitlab.com/kicad/code/kicad/issues/10251
2022-01-05 11:19:43 +01: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 cc5003a919 Update python for the pad wxSize switch 2022-01-04 23:28:06 -05:00
Jon Evans bf38cb56b7 Handle footprint shapes in polygon creation
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10259

(cherry picked from commit f9d8ec6137)
2022-01-04 21:31:47 -05:00
Jon Evans 4be56825bb Fix creating polygons from footprint rule areas
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10257

(cherry picked from commit e9b91b6fab)
2022-01-04 21:31:40 -05: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
Seth Hillbrand e6b5cb3a5c Fix missing FOOTPRINT cast in swig
Fixes https://gitlab.com/kicad/code/kicad/issues/10236

(cherry picked from commit ca8cf14dff)
2022-01-04 11:09:51 -08: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
jean-pierre charras c2b54faceb CvPcb: fix crash due to a null pointer: pcbconfig() can return null.
CvPcb has no config option and pcbconfig() returns nullptr.
In this case use default settings.
Fixes #10250
https://gitlab.com/kicad/code/kicad/issues/10250
2022-01-04 14:51:32 +01:00
Seth Hillbrand ed35f4bfc5 Fix pad snapping in renumber pads
Snap shouldn't be looking for other items in this routine or using the
grid

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

(cherry picked from commit ed9a3deb57)
2022-01-03 19:39:04 -08:00