Commit Graph

288 Commits

Author SHA1 Message Date
Jon Evans e9b627bfd8 ADDED: Center marker dimension type 2020-09-16 20:55:11 -04:00
Jon Evans 75ffce1a0b ADDED: Leader dimension object
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5555
2020-09-15 23:37:38 -04:00
Jon Evans 0347515cec Support text expansion in dimensions 2020-09-12 10:23:19 -04:00
Jon Evans 76c4c959e6 Implement new dimension properties
- Automatic units mode (follow UI units)
- New text and number formatting options
- Automatic/manual text orientation control
- New text positioning options (inline and manual)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4280
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4497
2020-09-11 21:12:36 -04:00
Jon Evans b11e315d10 Refactor DIMENSION to hide internal details; add some new properties
This is a board file format change to account for the new properties.
Also, we now only store the critical information about the dimension's
geometry in the board, rather than storing every drawn line.

The DIMENSION object is now an abstract base, and ALIGNED_DIMENSION
is the implementation that exists today (we will add more dimension
types in the future)
2020-09-11 21:12:36 -04:00
Jon Evans 147540b3bb ADDED: Control to only show ratsnest for visible layers 2020-09-07 16:43:43 -04:00
Jon Evans 4433259c80 Fall back on copper color when net color is not found
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5540
2020-09-07 11:51:55 -04:00
qu1ck 636285311e Make DRAWSEGMENT::GetRectCorners return vector
... instead of modifying the argument.
This will make the method usable in python API and will not incur
permormance penalty because named return value optimization (NRVO)
is a thing since C++11.
But even if copy is not elided vector is moved instead of copied.
https://en.cppreference.com/w/cpp/language/copy_elision
2020-09-07 05:33:10 +00:00
Jeff Young 8ffad4b375 Only override color if net or netclass color is set.
Fixes https://gitlab.com/kicad/code/kicad/issues/5368
2020-09-04 14:07:42 +01:00
Jeff Young 49ac89f72c Only paint pads on layers they appear on.
Also adds pad layer removal controls to Pad Properties dialog.

Fixes https://gitlab.com/kicad/code/kicad/issues/5320
2020-08-23 21:23:34 +01:00
Jon Evans cffbc34f12 Fix some logic issues with net coloring
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5266
2020-08-19 18:42:46 -04:00
Jon Evans d7b38d10c2 Use layer base color to create selection candidate color
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5072
2020-08-18 22:57:17 -04:00
Jon Evans 17066134f4 Fix brightness factor application for selected items
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5236
2020-08-18 20:55:41 -04:00
Jeff Young 8234e70e77 Remove unused footprint text front & back colours. 2020-08-17 23:55:31 +01:00
Jon Evans 0db00046d1 Fix rendering of net colors on items 2020-08-15 18:50:44 -04:00
Jon Evans bd14f8a82a ADDED: New appearance control widget for PcbNew
Featuring:
- Layer view presets
- Per-type opacity for tracks, vias, pads, zones
- Net and netclass color and visibility controls

CHANGED: Simplified object visibilty controls

Fixes https://gitlab.com/kicad/code/kicad/-/issues/1951
Fixes https://gitlab.com/kicad/code/kicad/-/issues/1981
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2003
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2173
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2254
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4325
2020-08-15 15:24:28 -04:00
Jeff Young 393bb0fd83 Fix assert where geometry routine wasn't ready to handle layers.
This introduces layer handling to a lot of the geometry routines.
Many of them don't do much with it now, but it does help multi-layer
zones and will help when padstacks are implemented.
2020-08-12 22:20:08 +01:00
Qbort b41892e4da Rename class GROUP in pcbnew to PCB_GROUP
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5156
2020-08-12 15:36:08 +01:00
Joshua Redstone ee428876ec ADDED: Group/Ungroup function
This implements the group/ungroup functions to mark a set of EDA_ITEMs as a unit, allowing them to be moved and rotated as a unit
2020-08-11 19:37:07 +00:00
Seth Hillbrand 5fc6b74c89 ADDED: Remove unused pads
This option removes copper layers from pads and vias where they are not
connected to other board elements.  This allows the inner layers to be
more closely routed if the via landing pad is not needed.

Fixes https://gitlab.com/kicad/code/kicad/issues/1835
2020-08-10 03:27:26 +00:00
Fabien Corona 133d082cc5 Pcbnew fix arc edition 2020-08-09 23:03:31 +00:00
Jeff Young e5b50d90a7 Update DRC rules to new layer and disallow grammars.
Also adds support for hooking rules up to named zones.

Fixes https://gitlab.com/kicad/code/kicad/issues/2041
2020-08-07 21:49:36 +01:00
Jeff Young 77fd384da5 Don't allow 45deg rotation to bloat pad numbers/netnames.
Fixes https://gitlab.com/kicad/code/kicad/issues/5064
2020-08-04 17:54:05 +01:00
jean-pierre charras 87ebd34ea2 Optimize drawings for degenerated oval pads (in fact circle) and for round pad holes 2020-07-31 10:54:53 +02:00
Tomasz Wlostowski 89a953e039 Migrated GetEffectiveShape(s) to SHAPE_COMPOUND 2020-07-29 23:14:03 +02:00
Jon Evans 2ea42196ed Ensure high contrast mode gets a proper default value
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4864
2020-07-12 11:34:58 -04:00
Jon Evans 5d118b0700 More visibility settings infrastructure
ADDED: Three-state high contrast mode action
ADDED: Save contrast mode in local settings

Also some initial infrastructure for layer presets
2020-07-11 21:59:07 -04:00
Jon Evans d248736f08 Draw ratsnest with colors if color data is available 2020-07-10 21:37:53 -04:00
Jon Evans 72b08f2b18 ADDED: Hide ratsnest for specific nets
List of hidden nets stored in project local settings
Hide/Show actions in context menu only for now, will
add them to some more GUI places soon.

Ref https://gitlab.com/kicad/code/kicad/-/issues/1951
2020-07-10 21:06:17 -04:00
Jon Evans afd432e687 Infrastructure for net hiding
LoadProjectSettings changed to take place after the board
has been loaded so that board-specific project settings can
be applied (such as net visibility and color overrides)
2020-07-08 21:59:34 -04:00
Jon Evans 961fbadd23 Initial infrastructure for net/netclass colors in board 2020-07-07 22:21:45 -04:00
Jeff Young d85a707385 Move rest of DRC to SHAPE collision architecture. 2020-07-06 20:00:50 +01:00
Jeff Young 9cbcf3fe56 Improve pad annotation for custom-shaped pads.
Use the bounding box instead of the anchor pad size for determining
LOD and size/location of annotations.
2020-06-29 12:48:55 +01:00
Jon Evans 0d4ee39f75 CHANGED: Copper zones can be on more than one layer
Fixes https://gitlab.com/kicad/code/kicad/-/issues/1963
2020-06-28 08:52:37 -04:00
Jeff Young 32c3ea4edd Flags cleanup.
Remove extraneous use of FLAG0 from tracks cleaner (it was checked but
never set).

Fix issue in expand connections where two parts of it couldn't agree
on the same flag (BUSY vs SKIP_STRUCT), and where the second part was
clearing the flag instead of setting it.

Remove obsolete HIGHLIGHT infrastructure (we now use selection).

Remove extraneous use of BUSY flag in several places (it was never
set).
2020-06-27 17:53:04 +01:00
Jeff Young e376750f62 Flatten CS_PAD_PRIMITIVE out in favour of reusing DRAWSEGMENT.
(In prep for the eventual replacement of DRAWSEGMENT internals with
SHAPE.)
2020-06-24 12:22:42 +01:00
Jeff Young d01b29ab37 Cleanup pad geometry handling.
There were a lot of plotters, exporters, etc. that were rolling their
own implementations.

This also introduces a lazily-built set of SHAPE objects for doing
collision detection and some forms of rendering (and later DRC).
2020-06-22 22:28:37 +01:00
jean-pierre charras 7240b3e4d3 PCB_PAINTER for D_PAD: for round and oval shapes, use native gal draw functions,
instead of convert shapes to polygons.
For small pad sizes (< 0.5mm) the polygonal shape is really ugly.
Moreover, circles and oblong shapes are native in gal and give a much better look.
2020-06-21 19:47:26 +02:00
Jeff Young 970921f88b Support for filled DRAWSEGMENT::S_RECT and S_CIRCLE.
One more step in unifying pad primitives and draw segments.
2020-06-20 14:34:53 +01:00
Jeff Young aeed8e6e2c Finish implementation of DRAWSEGMENT::C_RECT.
It's currently only supported in the Footprint Editor.  It could be
easily added to the board editor (all the code is there), but the board
editor is a little short on room in the drawing tools toolbar.
2020-06-15 20:51:31 +01:00
Jeff Young d99febba6c Treat sketch mode module items and board items the same. 2020-05-26 23:21:38 +01:00
Jon Evans c7daf8a8f3 ADDED: Cross-probe highlighting of bus members
Note: this is a basic implementation but it could be
improved once we include bus information in the netlist
and pcbnew can natively keep track of buses and nets
instead of just nets.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4158
2020-05-24 13:30:23 -04:00
Jeff Young 03c47e210c Apply blind/buried via drawing to microvias. 2020-05-11 22:56:09 +01:00
Jon Evans 366673d995 Don't try to draw a zone that has no outline
Fixes #4352
2020-05-07 17:44:55 -04:00
Jeff Young dce42612d3 Fix via printing.
LAYER_VIAS needs to get set for them to print at all, and GetLOD
needs too look at the view layer visibiilties, not the board layer
visibilities.

Also implements a more pad-like strategy for printing blind/buried
vias when printing one layer per page (where the top/bottom arcs
don't make sense).

Fixes https://gitlab.com/kicad/code/kicad/issues/1938
2020-04-20 17:02:38 +01:00
Jeff Young 2b6089240a Change super/subscript syntax to ^{foo} and _{foo}. 2020-04-18 21:04:41 +01:00
Jeff Young 9c8941e040 Remove a bunch of globals. 2020-04-16 17:34:46 +01:00
Jeff Young 6e800bddae Rationalize penWidth processing as first step in removing some globals. 2020-04-13 20:58:13 +01:00
jean-pierre charras 5f60d955be minor fix for commit eb250b4cb 2020-03-24 18:43:15 +01:00
jean-pierre charras eb250b4cb0 PCB_PAINTER: minor fix: display better pad shapes on solder paste layers.
the parameter margin percent was badly handled for rectangular/oval pads,
giving an incorrect solder paste shape for non 0.0 values
now it is is correctly handled.
2020-03-24 18:29:12 +01:00