Commit Graph

2477 Commits

Author SHA1 Message Date
Mike Williams b42365190e Schematic/PCB: deleting fields sets them to invisible 2022-04-21 16:20:23 +00:00
jean-pierre charras 26370583fa French translation update and fix a typo. 2022-04-18 11:25:51 +02:00
Jeff Young 71c2cb3180 ADDED revert for pcbnew and eeschema.
Fixes https://gitlab.com/kicad/code/kicad/issues/6802
2022-04-17 20:02:58 +01:00
Jeff Young 9ff1ae5bdc Better inspection reporting for netclasses, custom rules and DRC. 2022-04-17 00:33:56 +01:00
Jeff Young 7f3a75bccd Add a bunch more inspections for rule resolution. 2022-04-15 22:10:13 +01:00
Jeff Young c78a47c3fb Remove extra test.
Fixes https://gitlab.com/kicad/code/kicad/issues/10364

Fixes https://gitlab.com/kicad/code/kicad/issues/10364
2022-04-14 17:09:27 +01:00
Jeff Young a49bb792bd Insert chevrons when placing vias near tracks.
Fixes https://gitlab.com/kicad/code/kicad/issues/10898
2022-04-11 16:26:36 +01:00
Jeff Young 29eb5931c2 Be more careful with forced cursor positions.
Fixes https://gitlab.com/kicad/code/kicad/issues/9977
2022-04-10 23:14:57 +01:00
Jeff Young c17b90c8dc Run pinning on sides as well as corners.
Also fixes a bug in LIB_SHAPE's Normalize() which wasn't handling the
upside-down coordinate system.

Fixes https://gitlab.com/kicad/code/kicad/issues/11339
2022-04-07 11:51:58 +01:00
Seth Hillbrand 9fcc641808 Don't set the dirty bit when running DRC
Dirty bit is set in the zone filler separately, there is no action in
the DRC that needs to be saved

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

(cherry picked from commit 821fe6ea42)
2022-04-06 17:05:19 -07:00
Jeff Young f272056f20 Fix assert. 2022-04-04 20:43:08 +01:00
Jeff Young 7f7910d922 Dirty text caches in pcb point editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/11319
2022-04-04 17:39:58 +01:00
Seth Hillbrand 737d65fd36 Skip zero-size elements when converting
Also fixes an assertion when converting to polygon from the board editor

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

(cherry picked from commit 6706a5c462)
2022-04-01 13:24:10 -07:00
Jeff Young d174af4006 Handle textboxes moving back to RECT shape (ie: cardinal rotation). 2022-04-01 16:12:23 +01:00
Jeff Young a35ae8cdce Don't re-fetch selection when running select-in-same-sheet.
Fixes https://gitlab.com/kicad/code/kicad/issues/11110
2022-03-28 21:54:24 +01:00
Mike Williams e51ab86225 Schematic Drag: fixes and improvements
Fixes:
* Various special cases around junctions on pins and dragging.

* Some rotations of endpoints resulting in a 45 degree rotate.

* Some cases where it was possible to get a line with neither
  endpoint selected, and also substractive unselecting only one of two
  selected endpoints unselecting both.

* Use line midpoint for sorting.  Start and endpoints aren't
  consistent in the order they appear on the X or Y axis. So,
  we need to use the midpoint for our position for consistent
  sorting when dragging groups of parallel lines where some
  have the start and end reversed.

Other:
* Rename TEMP_SELECTED TO SELECTED_BY_DRAG. This is the actual meaning
  of the flag, and should reduce confusion as
  to when it should be used.

* Move usage of TEMP_SELECTED as an algorithmic mark to CANDIDATE
  instead.

* Fix mistaken clearing of START_POINT and ENDPOINT.

* Move endpoint setting and clearing out of narrowSelection, and into
  selectPoint and selectMultiple.

* Don't show dangling end warnings on new lines
2022-03-28 16:02:48 -04:00
Jeff Young 343b2681d4 Midpoints for eeschema rectangles and text boxes.
Fixes https://gitlab.com/kicad/code/kicad/issues/10362
2022-03-28 11:16:39 +01:00
Wayne Stambaugh 7da7864f5e Fix some Coverity issues. 2022-03-25 15:51:05 -04:00
Wayne Stambaugh 7b2d9dfc0c Fix some Coverity uninitialized scalar variable issues. 2022-03-24 13:17:07 -04:00
Jeff Young cf611f1742 Better safety around layersets. 2022-03-21 18:19:00 +00:00
Jeff Young 4f62960334 Update message panel from PCB point editor and SCH drawing tools.
Fixes https://gitlab.com/kicad/code/kicad/issues/11186
2022-03-21 10:32:36 +00:00
Jeff Young fa5a484797 Remove unused variable. 2022-03-16 14:56:32 +00:00
Jeff Young 06c1bccccd Exclude hidden text from selection in FP Editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/11111
2022-03-12 23:29:01 +00:00
Fabien Corona d452f79860 pcbnew: search for nets
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10601
2022-03-10 23:12:30 +00:00
Seth Hillbrand b5c2f0d39a Remove the open array in favor of std containers
The containers allow iteration, size knowledge and lower bug surface
2022-03-03 16:03:26 -08:00
Jeff Young ec5b7a57ec Consistency in via dimensions terminology.
Fixes https://gitlab.com/kicad/code/kicad/issues/11024
2022-03-03 22:40:18 +00:00
Seth Hillbrand 2fafa55647 Maintain width of converted tracks 2022-03-02 10:45:53 -08:00
Seth Hillbrand 7e836ae27a Select the copper layer before processing
If we are converting to tracks, the copper layer needs to be selected
before any other elements are processed, otherwise, we end up with the
default undefined layer

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

(cherry picked from commit 9396735733)
2022-03-02 10:41:44 -08:00
Jeff Young 1966972fc1 Retire no-pads warning in favour of defaulting to area-based remove islands strategy. 2022-03-01 19:19:18 +00:00
Jeff Young 843a56c4e4 Implement two-staged zone priority: assigned priority followed by UUID. 2022-03-01 14:53:35 +00:00
Jeff Young a4a3f6ff74 Fix zone/connectivity deadlock. 2022-03-01 12:02:17 +00:00
Seth Hillbrand fab78af176 Remove TEDIT
This marker is not used in KiCad and creates merge conflicts when two
different users edit the same file
2022-03-01 00:25:44 +00:00
Jeff Young 58b8d63ff8 Draw boundary based on first zone layer. 2022-02-28 21:40:36 +00:00
Jeff Young d299ddbc7e Cleanup. 2022-02-27 12:05:39 +00:00
Jeff Young ae85f57577 Drop a knee between tracks to a single item when dragging.
This prevents the disambiguation menu from coming up when we don't
really care which element we start the drag on.

Fixes https://gitlab.com/kicad/code/kicad/issues/10745
2022-02-26 22:54:23 +00:00
Jeff Young 89c14f01f7 Repair algorithm to avoid slow movement issue.
This goes back to the previous code for this one part.

Fixes https://gitlab.com/kicad/code/kicad/issues/10976
2022-02-26 15:58:44 +00:00
Seth Hillbrand 535ea800c0 Honor modifier keys in diambiguation
Needs to be reset for the new action before selecting elements at a
point.

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

(cherry picked from commit a30ad0b54a)
2022-02-25 16:16:15 -08:00
Seth Hillbrand 283aaff2df Use board polygon instead of bbox for size
Board BBox uses the visible size of the board, which includes edge cut
thickness.  This is not appropriate for the Board characteristics.
Using the outline polygon gives accurate results and falls back to a
bounding box in the case where the outline is invalid

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

(cherry picked from commit 54f621c570)
2022-02-25 11:14:54 -08:00
jean-pierre charras a7b8a1446b fix minor compil warnings. 2022-02-25 14:26:37 +01:00
Jeff Young bc51c89c90 Reconcile zone-auto-fill with undo. 2022-02-25 13:05:49 +00:00
Jeff Young 5c54f40eae Layer visibilities aren't stored in project for footprint editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/10953
2022-02-25 00:08:49 +00:00
Jeff Young d65f9ad2d8 Implement multi-layer stitching via logic. 2022-02-24 21:32:43 +00:00
Jeff Young 369f53bb19 Better DRC checking when placing vias. 2022-02-24 21:32:43 +00:00
Jeff Young b7be42375d Add an infobar warning when trying to fill a zone which is not connected. 2022-02-24 21:32:43 +00:00
Jeff Young d465eb6425 ADDED: automatic zone refilling.
This is for the out-of-box experience for novice users.  It is presumed
that folks with larger more complicated boards will turn it off.

Fixes https://gitlab.com/kicad/code/kicad/issues/6413
2022-02-24 18:16:45 +00:00
Jeff Young f076d07e9e Fix asserts. 2022-02-24 18:16:45 +00:00
Jeff Young 41f6e634c6 Partially integrate grid snapping with constraints.
Fixes https://gitlab.com/kicad/code/kicad/issues/10941
2022-02-22 22:19:55 +00:00
Jeff Young df3291c59d Fix nullptr error (no router tool in footprint editor). 2022-02-20 16:56:53 +00:00
Jeff Young f18aae679c Use router to update message panel when routing.
Fixes https://gitlab.com/kicad/code/kicad/issues/10068
2022-02-20 16:50:30 +00:00
Jeff Young 85805b95ba Cancel or commit pad edit mode when switching footprints.
Fixes https://gitlab.com/kicad/code/kicad/issues/10209
2022-02-19 19:36:19 +00:00
Jeff Young 5efa354f0f Add asserts to flush out incorrect uses of GetLayer(). 2022-02-18 12:14:38 +00:00
Jeff Young 662fb40605 Slightly cleaner impl. 2022-02-17 12:48:29 +00:00
jean-pierre charras 5a9fb08778 zone_filler_tool: fix crash due to a null pointer use in zone filler.
Fixes #10875
https://gitlab.com/kicad/code/kicad/issues/10875
2022-02-17 09:21:14 +01:00
Jeff Young b1bd8421e0 Performance: remove associated triangle sets when removing outline.
This saves us having to re-triangulate at the end of zone filling.
2022-02-16 17:00:54 +00:00
Jeff Young 5c9e718407 Performance enhancements for connectivity.
1) Generate SHAPE_POLY_SET triangulation by outline so they can be
shared between connectivity system and other clients.
2) Don't add items to connectivity when reading board; we're going
to do a total rebuild anyway.
3) Use multithreading when caching triangulation.
2022-02-15 12:20:34 +00:00
Jeff Young 98b9c6e2a1 Better progress reporting and a slight performance boost on commit. 2022-02-15 12:20:34 +00:00
Jeff Young d2de114d21 More performance optimizations. 2022-02-15 12:20:34 +00:00
jean-pierre charras 876061369b Fix some Pcbnew crashes due to null pointers 2022-02-14 13:46:05 +01:00
Jeff Young a2ca8cf413 Improve SNR. 2022-02-12 18:38:11 +00:00
Jeff Young 00934fdd84 Move GUI queries in PLUGIN to a callback.
Also makes sure legacy zone fills get deleted and re-filled (since
just dropping the outline will change them).
2022-02-11 22:09:22 +00:00
dsa-t 68655540eb Clamp cursor to limits of coordinates representation
Also improves large distance handling.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8846
2022-02-11 16:42:52 +00:00
Jeff Young 50a4d610a6 Be cognizant of flashed layers when generating pad shapes. 2022-02-11 13:10:52 +00:00
Seth Hillbrand 51d7b49067 Don't halt expansion on zero-length
We avoid counting endpoints for tracks that have no length
2022-02-07 13:53:42 -08:00
Seth Hillbrand 162545ddf0 Validate arc output when editing
Handles checking output of the arc to ensure we don't end up generating
an invalid arc.  Also keeps the limit of the arc angle to be (360,360)
excluding 0.

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

(cherry picked from commit 8fc831cbc2)
2022-02-07 08:55:53 -08:00
jean-pierre charras 2485648a54 Fix typo in a copy/paste and a minor compil warning 2022-02-07 17:32:19 +01:00
Jeff Young 34a9a165c9 More wide-string declarations. 2022-02-05 22:26:31 +00:00
Marek Roszko a7ebfc31f9 Fix some leaking objects identified by PVS Studio V773 2022-02-05 11:16:11 -05:00
Jeff Young 4cc1ced2f3 Log an undo item when filling zones.
If we wanted to put it into the parent's undo item, then the *parent*
would need to not start a new undo record.  Not starting one in the
zone filler tries to add it to the *previous* change, not to the parent
change.

Fixes https://gitlab.com/kicad/code/kicad/issues/10091
2022-02-04 13:45:32 +00:00
Jeff Young 8d3e1639d0 Update text variables when they change.
Fixes https://gitlab.com/kicad/code/kicad/issues/10734
2022-02-04 12:52:46 +00:00
Jeff Young c8d14ade65 Only run starved-thermals checks when pad is actually connected to zone.
Fixes https://gitlab.com/kicad/code/kicad/issues/10583
2022-02-02 13:09:27 +00:00
Jeff Young 5739505aa3 TextBoxes for PCBNew. 2022-01-31 20:00:47 +00:00
jean-pierre charras f846f6f704 PCB_CONTROL::unfilledZoneCheck(): skip rule areas: they are not filled by definition.
Fixes #10691
https://gitlab.com/kicad/code/kicad/issues/10691
2022-01-31 17:01:52 +01:00
Alex e9ffea83fd Cross-probing: Do not center/zoom on empty BBox 2022-01-31 10:17:59 +03:00
Jeff Young f8d6bf4cc9 Hide text items which are required on a single-item delete.
Fixes https://gitlab.com/kicad/code/kicad/issues/9973
2022-01-22 22:27:41 +00:00
jean-pierre charras 5449a92878 PCB_POINT_EDITOR: fix missing init of PAD pos0 after changing the PAD draw pos.
Fixes #10558
https://gitlab.com/kicad/code/kicad/issues/10558
2022-01-22 10:23:55 +01:00
Jeff Young d5a2059c21 Error messages for zone merging.
Also fixes a bug where zones meeting at a point would get merged
resulting in a self-intersecting zone.

Also fixes a bug where undo would not be handled correctly when zones
could not be merged.

Fixes https://gitlab.com/kicad/code/kicad/issues/10466
2022-01-21 19:55:57 +00:00
Jeff Young c8a50d9b50 Remove unit-less angles from VECTOR2I/D APIs. 2022-01-20 23:58:20 +00:00
aris-kimi 47c0672ff3 Added footprint rule area anchors
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10461
2022-01-19 18:25:20 +00:00
dsa-t bc1ff6756f Cross-probing/selection for multiple items (SCH->PCB) 2022-01-16 20:29:03 +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
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
Jeff Young 07013d00e1 More 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
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
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
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
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
Jeff Young 89c0f8e297 Move to new font engine. 2022-01-02 14:57:03 +00:00
Marek Roszko 7d671cff1e Scoop up some more wxPoints 2022-01-01 21:06:40 -05:00
Seth Hillbrand 410ed8a071 Prevent ops on empty selection
Fixes https://gitlab.com/kicad/code/kicad/issues/10164

(cherry picked from commit bd75cffff3)
2022-01-01 15:29:18 -08: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 3a8ffd40b8 Fix dimension drawing bug. 2021-12-26 17:30:21 +00:00