Commit Graph

73 Commits

Author SHA1 Message Date
Wayne Stambaugh a1fb8e1b1d Coverity fixes and code cleaning. 2023-03-06 07:12:18 -05:00
Jeff Young 362d85ef50 Special selection mode when in high-contrast with courtyard layer active.
Fixes https://gitlab.com/kicad/code/kicad/issues/13521
2023-02-11 21:11:07 +00:00
Alex b71fa91bc4 Don't write outside of overrides array on pad zone_layer_connections.
Use std::array to catch future errors in Debug.

Fixes https://gitlab.com/kicad/code/kicad/issues/13803
2023-02-08 01:32:52 +03:00
Jeff Young f2f54fe926 Improve zone-layer-connections terminology and comments.
This makes it clearer that the overrides are not inverses of each
other -- one overrides the flashing state and the other overrides
the connection state (to other zones, not to everything).

Also fixes a bug where we were failing to check the force-no-connect
for pads.
2023-02-05 17:39:42 +00:00
Alex 13ce2ebf46 15% rendering optimization in PCB_TRACK::ViewGetLOD. 2023-01-27 18:37:43 +03:00
Jon Evans e11012fe06 Properties: show via friendly name
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13635
2023-01-23 08:56:21 -05:00
Jeff Young 0c8f95aa02 Make sure tesselate_lambda has lock before modifying zone.
Also implements locking for upating pad & tracks' zoneConnectionCaches.

Fixes https://gitlab.com/kicad/code/kicad/issues/13531
2023-01-15 15:52:24 +00:00
Jon Evans c530bdb5a1 Rename GetSelectMenuText to GetItemDescription
This descriptive text is used for many more things than
just the select menu these days.
2023-01-11 22:27:44 -05:00
Tomasz Wlostowski 7d40bbdf38 router: mark the head trace (as opposed to the 'fixed tail') with fully saturated color
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11386
2022-12-29 17:54:59 +01:00
Jon Evans 5eb3f5d3e7 Use correct translation macro for group names
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13277
2022-12-26 20:11:20 -05:00
Jon Evans 2b4cafe9f7 Properties: Fixes for arc tracks 2022-12-22 17:45:16 -05:00
jean-pierre charras 50d34e232b pcbnew: fix a bug that crashes pcbnew on startup when running under gdb/msys2 2022-12-02 15:14:17 +01:00
Jon Evans 73b3f28c25 Properties: mask layer property for items that can't set it 2022-12-01 22:22:29 -05:00
Jon Evans b2b3f5752f Properties: Add grouping and sorting by creation order 2022-11-27 22:40:23 -05:00
Jon Evans bbea5b3fbc Save and restore properties and search panel sizes 2022-11-25 09:11:30 -05:00
Jeff Young 1aad2fb37b Change via keep-start-end to be start/end, not top/bottom.
The implementation used to always check F_Cu and B_Cu, rather than
where the via started and ended (which will be different for blind/
buried vias and microvias).
2022-11-23 21:37:50 +00:00
Jeff Young 03ba14c6d3 Tighten lifecycle management of parent group pointers.
Also adds some debugging to try to catch dangling pointers.

Also adds a cache for group bounding boxes (which will be expensive
to calculate for large groups).

Fixes https://gitlab.com/kicad/code/kicad/issues/12875
2022-11-11 17:27:28 +00:00
Seth Hillbrand c1f2ca1d8d Make multiple names of the net on a track
Rather than moving the netname around, we want to keep the correct
number of netnames on a track such that there is always at least one
displayed on long tracks even when panning.

This reduces calculation time while keeping the netnames visible

Fixes https://gitlab.com/kicad/code/kicad/issues/12436
2022-11-04 11:49:50 -07:00
Seth Hillbrand c95bd3fc89 Cache LOD for netname redraw
When panning, we should only redraw the netnames when they come into
view or go out of view.  Caching the LOD provides this preventing
unneeded redraws while still redrawing on zoom changes

Fixes https://gitlab.com/kicad/code/kicad/issues/12436
2022-11-03 13:50:12 -07:00
Jon Evans a5d685ff5c Handle coordinate transforms in properties system
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12320
2022-10-31 23:01:52 -04:00
Jeff Young d16b23d16e Name shortening and line-break reduction. 2022-10-21 18:41:39 +01:00
Jeff Young 437d2c4589 Overhaul of remove-unconnected's zone filling and drawing strategies.
1) The highest priority zone that a via/pad collides with "owns" its
connectivity state.  Once set, lower priority zones cannot change it --
and in fact, if they would have connected to it are forced not to.

2) The connectivity state goes with the zone fill state, and therefore
must be saved in the file.

3) Display of remove-unconnected's pads is no longer done in GetViewLOD()
(which isn't called for selected items), and is instead done in PCB_PAINTER.
This allows us to draw the full pad in outline mode when a via/pad is
selected which would otherwise only show the hole.

4) Note that in some cases this will still generate DRC errors -- in
particular when a via nearly collides with a higher priority zone it
won't get "owned" by that zone and may therefore have insufficient
clearance if said zone concludes it's unconnected and a subsequent
(lower priority) zone connects to it (causing it to now become flashed).

Fixes https://gitlab.com/kicad/code/kicad/issues/11299
2022-10-18 13:05:42 +01:00
Jeff Young 4af98827fd Revert change for 11299, and update removed-pad items after zone fills.
Fixes https://gitlab.com/kicad/code/kicad/issues/12645
2022-10-15 16:06:57 +01:00
Seth Hillbrand b4f3390626 Drill size is absolute
Use hole plating size for visibility only, not zone filling, routing or
DRC
2022-10-04 09:52:40 -07:00
Jeff Young 7e71dc084c Implement Mirror H/V for tracks and vias.
While not that often useful, it's really annoying that it doesn't work
when you *do* find a use-case for it.

Fixes https://gitlab.com/kicad/code/kicad/issues/6853
2022-09-24 19:55:48 +01:00
Seth Hillbrand 0150655ed3 Fix missing DRC check with via
When the via is first and not second in our ordering, the hole-copper
clearance was not checked as the track did not have a hole.

We also calculated the NPTH-via clearance incorrectly in the inspector
2022-09-20 13:43:01 -07:00
Jeff Young 64a6fc0fd4 Push UNITS_PROVIDER down into a low-level mixin.
This allows us to also construct cheap UNIT_PROVIDERs for specific
tasks when necessary.
2022-09-19 17:10:59 +01:00
Jeff Young 45d6b4a9fc Readability improvements. 2022-09-19 11:18:20 +01:00
Marek Roszko a8613ee80f Combine Iu2Millimeter & remove PcbMm2iu 2022-09-16 21:09:26 -04:00
Mark Roszko b00178adb3 Nuke base_units from orbit 2022-09-16 04:38:10 +00:00
Jeff Young b4492e0bd2 More EDA_RECE yeetage. 2022-08-31 17:19:50 +01:00
Jeff Young f17a865593 Move EDA_ITEM hitTest to BOX2I. 2022-08-31 17:18:45 +01:00
Jeff Young 2dc6300501 Move EDA_ITEM bounding boxes to BOX2I. 2022-08-31 10:16:55 +01:00
Maciej Suminski af71d42307 Renamed PROPERTY_TYPE enum names to avoid a conflict on MSYS2 2022-08-22 21:32:32 -04:00
Maciej Suminski 95fd58b25a Properties meta-data for pcbnew classes 2022-08-22 21:32:00 -04:00
Jeff Young 4f0136db3b Attempt to fix std::initializer_list lifetime issue. 2022-08-21 20:54:41 +01:00
Jeff Young aa2ad3b44c Move KICAD_T[] to std::initializer_list<KICAD_T>. 2022-08-20 10:28:11 +01:00
Jeff Young a9536b5de9 CHANGED netclass assignments now done via canvas or via patterns. 2022-08-14 22:56:29 +01:00
Jeff Young 43df863df2 Fix issue with caches not being initialized when printing msg bar. 2022-08-01 13:09:51 +01:00
Marek Roszko a8505d9c76 SEARCH_RESULT -> INSPECT_RESULT
To fix the name squatting it's doing for future functionality
2022-07-29 20:01:10 -04:00
jean-pierre charras 4d48376eae Fix some warnings detected by PVS-STUDIO (not used vars) 2022-07-26 16:00:14 +02:00
Jeff Young f41af10007 Clean up hole shapes for safety (smart pointer) and consistency. 2022-07-22 23:06:07 +01:00
Jeff Young 8a9bf02b7e Smarten up silk clearance & tented item handling.
The inspection tool will report whether or not the item is tented
(indicating in that case that any clearance will only be applied
to any hole).

The DRC test ignores tented items without a hole, and runs the
clearance test against the hole for items with a hole.

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

Fixes https://gitlab.com/kicad/code/kicad/issues/11951
2022-07-08 17:27:05 -06:00
Seth Hillbrand a43fcd045f Hyperlynx arcs are always CW
Previous test comparing start/end angles doesn't account for all cases.
This adds a more robust test to ensure all arcs are output in CW fashion

Fixes https://gitlab.com/kicad/code/kicad/issues/10782
2022-06-22 09:59:37 -07:00
Jeff Young 24ddf1ad20 Don't use zone connections to control optional via flashing.
Fixes https://gitlab.com/kicad/code/kicad/issues/11299
2022-05-23 10:26:52 +01:00
Seth Hillbrand 2f2e956921 Sync via/pad flashing for null boards
Pads return true by default and so should vias

(cherry picked from commit bfa1661edf)
2022-04-15 15:15:07 -07:00
Seth Hillbrand 442aae19d9 Separate flashing check for connectivity
When building the connectivity database, we should not be using the
connectivity to check for shapes.

To make this deterministic, we introduce two flags (ALWAYS_FLASH and
NEVER_FLASH) that are used with connectivity building to determine
whether a pad is flashed for connectivity or not.  ZONE <-> PAD/VIA
connectivity will be checked with ALWAYS_FLASHED and all other
connectivity will be checked with NEVER_FLASHED if they are marked for
potential annular ring removal.  If they are not marked for removal,
they will be checked ALWAYS_FLASHED.

Fixes https://gitlab.com/kicad/code/kicad/issues/11114
2022-03-16 17:30:01 -07:00
jean-pierre charras 0440aa3d83 Extend layer LAYER_LOCKED_ITEM_SHADOW to draw shadow markers on other locked items:
tracks, texts, graphics.
2022-03-09 18:50:31 +01:00
Jeff Young 293021c58c ADDED: knockout pcb and fp text.
Fixes https://gitlab.com/kicad/code/kicad/issues/7055
2022-03-08 13:22:20 +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