Previously, the count of segments used a magic number optimized for Pcbnew.
This is not good, and does not work well on Gerbview.
The count uses now a max error acceptable is approximation (5 microns in Gerbview and Pcbnew).
Fixes#9101https://gitlab.com/kicad/code/kicad/issues/9101
They don't define a KiCad string class, so the header file name was
somewhat misleading. But the fact that they didn't match definitely
made coding more difficult.
The error between the "right" shape and the polygon is slightly smaller.
The approximations of the inner arc and the outer arc are better, but not perfect.
Also add (for test and debug purpose only) the code to show the polygon when
drawing a PCB_ARC (currently disabled)
Do not remove footprint objects from list of selected objects when there
are no drawable objects other than the reference and value text.
Increase the minimum size rectangle for footprints from 0.025mm to 1mm
when the footprint has no drawing objects so that it is easier to select
the footprint in this case.
Add some pretty colors to the footprint bounding box and hull outline
so that it's possible to tell the difference between selection areas.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8379
The order of operations *appeared* to be a bit out of joint.
We need to create a new project in project mode as well as in standalone.
Fixes https://gitlab.com/kicad/code/kicad/issues/8143
When expanding an error to the outside of a rounded corner pad we
need to trim it to the pad bounding box or else we get little ears
where the circle approximation meets the pad square. This is expensive,
and for clearance lines we don't really care whether the error is
inside or outside.
Fixes https://gitlab.com/kicad/code/kicad/issues/8157
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
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
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
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
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.)
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
(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
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
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
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).
1) Make sure that layer dependencies don't prevent us from drawing
drill marks.
2) Don't draw pad shapes when their particular layer isn't enabled
(a side effect from the above)
3) Allow the printout painter to set a different hole colour (the
special case for through-hole pads was handled twice anyway -- once
in LoadColors() and once in draw( D_PAD ).
4) Replace the call to getDrillSize() which handles swapping in the
small mark size if set.
Fixes https://gitlab.com/kicad/code/kicad/issues/4847
Correctly hide netnames in high contrast mode
Correct highlighting for blind/buried/micro via drills
Repaint vias when needed to support stacked microvias
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2593
ADDED memberOf() function for DRC rule expressions.
Also fixes a bug in several of the pickers where the event wasn't
being correctly passed.
Fixes https://gitlab.com/kicad/code/kicad/issues/5647
ViewGetLOD() returns the minimal value of a zoom to show an item.
However a zoom is a double, and using int as minimal value does not
allows setting a correct value in some cases.
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)
... 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
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.
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
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
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)
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).
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).
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.
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.
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
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
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.
CHANGED: Settings are now stored in versioned sub-directories
ADDED: First-run dialog for migrating settings from a previous version
CHANGED: Settings are now stored as JSON files instead of wxConfig-style INI files
CHANGED: Color settings are now all stored in a separate settings file
CHANGED: The symbol editor and footprint editor now have their own settings files
CHANGED: Color settings are no longer exposed through BOARD object
CHANGED: Page layout editor now uses Eeschema's color scheme
Settings are now managed through a central SETTINGS_MANAGER held by PGM_BASE.
Existing settings will be migrated from the wxConfig format on first run of each application.
Per-application settings are now stored in one class for each application.
In high contrast mode, the holes of buried vias and microvias were no darkened when not on the active layer.
In high contrast mode, the outer circle of buried vias and microvias were alway darkened.
In high contrast mode, when the selected layer is non visible through-vias are now darkend.
Fixes: lp:1844982
* https://bugs.launchpad.net/kicad/+bug/1844982
The pointer passing for display options is deprecated. This removes the
excess casting as the EDA_FRAME didn't need the base call with no value.
All requests for display options are now returned const and are updated
with a Set() routine after modification.
In Gerbview, this resolves an issue where the display options were not
stored because it was receiving the NULL from EDA_FRAME.
This removes unused static function in page layout editor, unused
variable in pcb_painter and restors the gcc unitialized fix for
pcbnew's drawing_tool.
This assumes maximum registration errors are a vector, rather than
an amount in both x and y axes. Lots more disucssion in the bug
report and on the forum (link in the bug report).
Also makes large changes to the painting of pads, but they now use
the same code as plotting, so if there are any changes then they
were errors before since plotting represents "truth".
Fixes: lp:1563744
* https://bugs.launchpad.net/kicad/+bug/1563744
This mixes the de-emphasized layers into the background color rather
than merely a black color. This also keeps some of the original layer
color.
Fixes: lp:1831316
* https://bugs.launchpad.net/kicad/+bug/1831316