Commit Graph

364 Commits

Author SHA1 Message Date
Jeff Young 60d4d5b846 Scale down netnames on tracks so overbars fit.
Also fixes a bug where the overbar ignored the color opacity.

Fixes https://gitlab.com/kicad/code/kicad/issues/7524
2021-02-14 12:15:26 +00:00
Jeff Young 618e824b0f Cleanup includes and formatting. 2021-02-09 12:26:46 +00:00
Seth Hillbrand aa0db969ca Caching ConvexHull routine
Stores a cache of the convex hull similar to the bounding box.  Modifies
the hull based on actions to allow  complex footprint graphics without delay

Fixes https://gitlab.com/kicad/code/kicad/issues/7341
2021-02-04 15:56:52 -08:00
Jeff Young 46658076bd Minor cleanup. 2021-02-02 22:55:18 +00:00
Jeff Young b8e97bb6b6 Only apply B&W printer fixes when printing.
Fixes https://gitlab.com/kicad/code/kicad/issues/7388
2021-02-02 15:37:30 +00:00
Jeff Young 90519c8324 Allow pads with holes to be selected when hole is visible. 2021-02-02 14:23:29 +00:00
Jeff Young 1f27b7e7df Don't render hole walls when no physical layers are visible.
Fixes https://gitlab.com/kicad/code/kicad/issues/7369
2021-02-01 17:14:30 +00:00
Jon Evans a45b86d2ba Fix Coverity warning 2021-01-31 09:50:41 -05:00
Jeff Young a235103e48 Redo pad & via painting (again).
New strategy isolates all draw/don't draw decisions to the ViewGetLOD
routines, and all dimmed/not dimmed to PCB_RENDER_SETTINGS::GetColor.
The actual drawing in PCB_PAINTER is more-or-less conditon free.

Also adds new layers for pad and via hole walls so that they can be
controlled for high-contrast mode.

Also changes the drawing paradigm so that the pads are drawn even when
not on the high contrast layer, just in low contrast.  The hole wall
is drawn in high contrast.  This actually makes things clearer to the
user (although to be honest was done to keep from having to re-render
pads when the high contrast layer changes since we have two separate
layers now that we can adjut colours on).

Fixes https://gitlab.com/kicad/code/kicad/issues/7328
2021-01-30 16:31:27 +00:00
Jeff Young 74a5db64c2 Update pad netnames (and numbers) to the new visibility architecture. 2021-01-28 23:31:38 +00:00
Seth Hillbrand 714430fefa Flash pads when connected by zone
Zone connections (even half-connections) should trigger the connected
logic in flashPads.  This removes the double-standard for painting pads
and imposes thermal standoff based on the net connection to the pad if
it shares a net, not just if connected
2021-01-28 13:21:22 -08:00
Jeff Young 636ae012ed Overhaul the pad drawing special cases yet again.
New strategy is to draw the hole wall cylinder if the pad (or via)
isn't flashed on a particular layer.  This is (1) more correct,
(2) keeps pads which aren't flashed on any layer from disappearing,
and (3) allows us to remove a bunch of the other special cases.

Or at least I think it does.  The proof will be in the (lack of)
follow-on bug reports....

Also fixes a bug where via annular rings weren't highlighted in
high contrast mode.

Fixes https://gitlab.com/kicad/code/kicad/issues/7279
2021-01-28 17:02:42 +00:00
Jeff Young 06a0094597 Minor improvements to layer highlighting. 2021-01-27 14:52:22 +00:00
Jon Evans 30f3a7d124 Rework high contrast for pads/vias slightly
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6923
2021-01-26 21:02:11 -05:00
Jeff Young 7d6c1c5ee6 Improve comments. 2021-01-26 10:56:19 +00:00
Jeff Young 0ba0160da9 Add a PT_NIC pin electrical type and a netlist token for SCH_NO_CONNECT.
ADDED a new pin electrical type "free" for internally unconnected pins.

CHANGED the "unconnected" pin electrical type is now represented by
"no_connect" in files and netlists.  (The legacy syntax is also accepted
in files.)
2021-01-23 00:10:01 +00:00
Seth Hillbrand 8036303f8f Add margin to both sides to avoid drawing 0-poly
We cannot draw degenerate polygons, so we need to test for 0-size shapes
especially after scaling the mask.  The mask adjustment is from both
sides however, so it needs to be doubled.

Fixes https://gitlab.com/kicad/code/kicad/issues/7020
2021-01-09 13:05:58 -08:00
Jeff Young 8fffb75347 Allow custom pads with 0-sized anchor pads.
(Surprisingly we used to in 5.1, so this is a regression.)

Also had to go back to the nag dialog as on a small screen the infobar
comes up behind the dialog.  A lot of the errors have also been turned
into warnings, so the overall effect should still be to reduce nagging.

Fixes https://gitlab.com/kicad/code/kicad/issues/6992
2021-01-08 20:43:02 +00:00
Seth Hillbrand 4710b709d9 Only darken, don't hide vias unless requested
Fixes https://gitlab.com/kicad/code/kicad/issues/6912
2021-01-05 14:00:15 -08:00
Jon Evans 7e58f1aa9f Fix display of pads in high contrast mode
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6912
2021-01-02 14:16:17 -05:00
Seth Hillbrand 82e728dbf6 Remove drawing of annular rings in high contrast
High contrast should not show the annular rings from other layers.  Once
the ring is removed, we hide the annular when not focused on a flashed
layer

Fixes https://gitlab.com/kicad/code/kicad/issues/6896
2020-12-30 17:38:30 -08:00
Jeff Young efd16dca66 Fix a bunch of issues with group selection and highlighting.
Fixes https://gitlab.com/kicad/code/kicad/issues/6686
2020-12-29 12:41:24 +00:00
Jeff Young 1fc4523711 Remove pad-size-setting hack from PCB_PAINTER.
Also improves the pad warning and error messages, and moves a few
remaining nags from the setting infrastructure to the warning
infrastructure.

Fixes https://gitlab.com/kicad/code/kicad/issues/6141
2020-12-27 21:11:27 +00:00
jean-pierre charras a675f1f9c5 pcb_painter, draw pad clearance outlines: use the pad shape for non copper layers.
For copper layers, if the pad shape is not on the active layer, only the hole
shape clearance is shown (this is correct).
But for non copper layers using the hole shape clearance make no sense
(as long as showing the clearance makes sense for some layers).
2020-12-27 11:20:48 +01:00
Jeff Young 5fffde09d4 Improve SNR and formatting. 2020-12-24 10:36:29 +00:00
Jeff Young ffe7d2ea49 Only draw group boxes when selected.
Also ignore footprint groups when in board editor.

Fixes https://gitlab.com/kicad/code/kicad/issues/6826
2020-12-23 21:43:32 +00:00
Jeff Young 2142ad20b1 Draw FPText umbilical lines in themeable colour.
Fixes https://gitlab.com/kicad/code/kicad/issues/6664
2020-12-15 00:15:03 +00:00
jean-pierre charras 63088e8bdb Pcbnew: fix incorrect size of solder paste rectangular area of rect pads.
When the solder paste margin was the same for X and Y directions, the margin
was not taken in account (missing code)

Fixes #6621
https://gitlab.com/kicad/code/kicad/issues/6621
2020-12-05 11:51:08 +01:00
Jeff Young 7b347d793b Change gears on no-connect net generation. See bug rpt.
Fixes https://gitlab.com/kicad/code/kicad/issues/6534

Fixes https://gitlab.com/kicad/code/kicad/issues/6615
2020-12-04 18:25:48 +00:00
Jeff Young 190197794d Apply a similar fix as pads for B&W via printing.
Fixes https://gitlab.com/kicad/code/kicad/issues/6496
2020-11-27 22:31:07 +00:00
Jeff Young 7a2a302117 Fix several issues with pad/hole colors when B&W printing.
Fixes https://gitlab.com/kicad/code/kicad/issues/6496
2020-11-25 17:13:00 +00:00
Marek Roszko 16e3e59495 Split out arrayDim and MIRROR templates from macros.h
These were not macros
2020-11-17 20:21:04 -05:00
Jeff Young 7bd31d5237 Naming conventions. 2020-11-14 18:26:03 +00:00
Jeff Young 774a671b54 Fix footprint-relative coordinates when drawing polygons. 2020-11-14 14:15:02 +00:00
Jeff Young ec020dd19f First-class support for filled shapes. 2020-11-14 01:40:32 +00:00
Jeff Young bdbb68f813 MODULE -> FOOTPRINT. 2020-11-13 16:04:03 +00:00
Jeff Young 3451ac3088 PCB_MODULE_T -> PCB_FOOTPRINT_T 2020-11-13 15:16:24 +00:00
Jeff Young 9106cc19bf Yet another tranche of module -> footprint. 2020-11-13 15:16:24 +00:00
Jeff Young f5443de7f9 D_PAD -> PAD. 2020-11-13 15:16:24 +00:00
Jeff Young 84dd5108ba Remove some "class_" prefixes from files. 2020-11-13 15:16:23 +00:00
Jeff Young f7333ad64a Update some classnames including archaic zone names. 2020-11-12 10:31:25 +00:00
Jeff Young 7c60c2e404 Module -> footprint. 2020-11-07 18:50:30 +00:00
Jeff Young 317ae50d5f More protection for array bounds access. 2020-11-05 00:22:15 +00:00
Jeff Young 70b87f8529 Fix missing parameter to colour fetching.
Fixes https://gitlab.com/kicad/code/kicad/issues/6279
2020-11-04 13:29:49 +00:00
Jeff Young 4ff3b22118 Simpler active layer checking.
Also fixes an array index bounds issue.
2020-11-04 11:53:51 +00:00
Jeff Young fb8ec84db0 Cleanup hole and netname layer processing for high-contrast mode.
Fixes https://gitlab.com/kicad/code/kicad/issues/6237
2020-11-04 02:23:44 +00:00
Jeff Young 0f6a9b59a6 Re-implement via painting to coexist with appearances better.
Fixes https://gitlab.com/kicad/code/kicad/issues/6237
2020-11-03 18:17:59 +00:00
Jeff Young cd89951b64 Repair breakage from earlier Drill Mark fixes.
Fixes https://gitlab.com/kicad/code/kicad/issues/6237
2020-11-02 23:27:54 +00:00
Jeff Young 58c006bc45 Register properties for ARC elements so we can get their netclass.
Also improves GAL arc drawing and polygonization.

Fixes https://gitlab.com/kicad/code/kicad/issues/6039
2020-10-23 14:27:36 +01:00
Jeff Young 883c9e14f3 Don't draw 0-clearance clearance lines.
Fixes https://gitlab.com/kicad/code/kicad/issues/6108
2020-10-22 11:56:47 +01:00