kicad/common
Jeff Young e2bc7557cc Clean up arc/circle polygonization.
1) For a while now we've been using a calculated seg count from a given
maxError, and a correction factor to push the radius out so that all
the error is outside the arc/circle.  However, the second calculation
(which pre-dates the first) is pretty much just the inverse of the first
(and yields nothing more than maxError back). This is particularly
sub-optimal given the cost of trig functions.

2) There are a lot of old optimizations to reduce segcounts in certain
situations, someting that our error-based calculation compensates for
 anyway.  (Smaller radii need fewer segments to meet the maxError
condition.) But perhaps more importantly we now surface maxError in the
UI and we don't really want to call it "Max deviation except when it's
not".

3) We were also clamping the segCount twice: once in the calculation
routine and once in most of it's callers.  Furthermore, the caller
clamping was inconsistent (both in being done and in the clamping
value). We now clamp only in the calculation routine.

4) There's no reason to use the correction factors in the 3Dviewer;
it's just a visualization and whether the polygonization error is
inside or outside the shape isn't really material.

5) The arc-correction-disabling stuff (used for solder mask layer) was
somewhat fragile in that it depended on the caller to turn it back on
afterwards.  It's now only exposed as a RAII object which  automatically
cleans up when it goes out of scope.

6) There were also bugs in a couple of the polygonization routines where
we'd accumulate round-off error in adding up the segments and end up with
an overly long last segment (which of course would voilate the error
max). This was the cause of the linked bug and also some issues with vias
that we had fudged in the past with extra clearance.

Fixes https://gitlab.com/kicad/code/kicad/issues/5567
2020-09-11 11:23:49 +01:00
..
dialog_about Remove flags icons and abandoned languages 2020-08-18 05:32:21 -07:00
dialogs HTML_REPORTER dialog. 2020-09-10 20:58:38 +01:00
gal ADDED: Menu option to enable/disable snap to grid 2020-09-10 20:09:30 -07:00
kicad_curl Remove all debugging output that cannot be disabled. 2020-08-18 10:17:36 -04:00
libeval Move lemon parser generation into build directory 2020-08-10 13:53:54 +00:00
libeval_compiler libeval_compiler: fix crash when preflighting method calls with 0 arguments 2020-09-08 01:31:42 +02:00
page_layout Add snapping to eeschema 2020-09-09 10:18:15 -07:00
plotters Clean up arc/circle polygonization. 2020-09-11 11:23:49 +01:00
plugins CADSTAR PCB Archive Importer: Formatting fixes 2020-09-08 21:21:21 +00:00
preview_items Don't allow preview to try and draw empty polygons. 2020-08-22 23:46:56 +01:00
project ADDED: Control to only show ratsnest for visible layers 2020-09-07 16:43:43 -04:00
settings ADDED: Menu option to enable/disable snap to grid 2020-09-10 20:09:30 -07:00
swig pcbnew: fix Python bindings compile error 2020-09-08 01:53:19 +02:00
tool Make grid snapping depend on grid visibility 2020-09-09 10:18:15 -07:00
view ADDED: Menu option to enable/disable snap to grid 2020-09-10 20:09:30 -07:00
widgets ADDED: Menu option to enable/disable snap to grid 2020-09-10 20:09:30 -07:00
CMakeLists.txt HTML_REPORTER dialog. 2020-09-10 20:58:38 +01:00
advanced_config.cpp Add a min pin width advanced config for plotting. 2020-09-08 20:19:54 +01:00
array_axis.cpp Pcbnew: add a step field to the array tool 2019-05-16 11:20:52 +01:00
array_options.cpp Arrays: isolate axis code in a new class 2019-05-16 11:20:52 +01:00
base64.cpp Plot SVG embedded 2019-12-08 08:57:33 -08:00
base_screen.cpp Undo for schematic-wide operations. 2020-07-13 12:32:17 +01:00
base_struct.cpp Remove all debugging output that cannot be disabled. 2020-08-18 10:17:36 -04:00
base_units.cpp Fix a few issues with zone islands 2020-06-29 12:16:37 -04:00
basic_gal.cpp Cleanup: Replace push_back with emplace_back 2019-12-05 13:41:21 -08:00
bin_mod.cpp Move the file history into the frames 2020-05-17 00:12:49 +01:00
bitmap.cpp Move scaled toolbar separator into ACTION_TOOLBAR 2020-06-26 21:29:03 +00:00
bitmap_base.cpp BITMAP_BASE, Eeschema: fix incorrect position of the bitmap when printing. 2020-05-25 07:51:46 +02:00
board_printout.cpp Make sure Gerber print options have a color settings. 2020-08-25 14:08:09 +01:00
build_version.cpp Fix a compil warning and 2 Coverity warnings. 2020-08-07 13:13:25 +02:00
commit.cpp Convert UNDO_REDO_T to an enum class 2020-08-26 18:04:32 +00:00
common.cpp Don't trim both back and front if there's only one char. 2020-08-26 00:02:37 +01:00
config_params.cpp Rip out the unused leftovers of the old color system 2020-06-18 22:32:14 -04:00
confirm.cpp Fix library table panel path adding and cleanup duplicate dialog 2020-02-14 19:07:27 +00:00
cursor_store.cpp Fix preprocessor expression 2020-03-01 00:33:45 +00:00
dialog_shim.cpp Remove all debugging output that cannot be disabled. 2020-08-18 10:17:36 -04:00
draw_panel_gal.cpp Sometimes a DRAW_PANEL_GAL wants its immediate parent and sometimes not. 2020-09-03 15:03:09 +01:00
drc_rules.keywords common: include drc_proto keywords in the main DRC parser 2020-08-13 14:50:59 +02:00
dsnlexer.cpp Remove all debugging output that cannot be disabled. 2020-08-18 10:17:36 -04:00
eagle_parser.cpp Remove all debugging output that cannot be disabled. 2020-08-18 10:17:36 -04:00
eda_base_frame.cpp Show an error message when switching to a language that isn't installed 2020-09-02 00:10:25 +01:00
eda_dde.cpp Push KIWAY_HOLDER down a level so we can move a bunch of stuff that doesn't belong there out. 2019-06-10 23:46:00 +01:00
eda_doc.cpp Add text variable support to envVar processing. 2020-04-05 20:52:26 +01:00
eda_draw_frame.cpp Give new footprint libraries a dummy name in the file dialog 2020-09-02 00:10:25 +01:00
eda_pattern_match.cpp C++14: Remove unused make_unique.h 2019-08-07 09:27:31 -07:00
eda_size_ctrl.cpp Switch to scoped enums 2019-12-20 14:11:39 +00:00
eda_text.cpp EDA_TEXT: rename GetEffectiveShape() to GetEffectiveTextShape() to avoid name aliasing with BOARD_ITEM inteface 2020-08-13 14:50:59 +02:00
env_paths.cpp Project settings fixes from review 2020-07-02 22:08:54 -04:00
env_vars.cpp Add configuration of Hi-DPI canvas scaling in OpenGL 2019-03-25 15:00:55 +00:00
exceptions.cpp Cleanup of extraneous calls for string conversion. 2020-07-28 20:44:40 +01:00
executable_names.cpp Move executable name constants to own file 2017-03-23 09:23:45 -04:00
filehistory.cpp File history (recent opened files): fix incorrect behavior when a filename 2020-08-05 15:48:03 +02:00
filename_resolver.cpp Add text variable support to envVar processing. 2020-04-05 20:52:26 +01:00
filter_reader.cpp Cleanup: Replace C-only deprecated headers 2019-12-05 11:03:15 -08:00
footprint_filter.cpp Cleanup to make implementation names consistent with what they now do. 2019-09-03 19:29:30 +01:00
footprint_info.cpp Catch exception so that we at least throw up an error message. 2020-07-13 22:41:56 +01:00
fp_lib_table.cpp Get rid of extraneous char conversion. 2020-08-05 22:23:53 +01:00
gbr_metadata.cpp Fix build error and cleanup overzealous refactor changes 2020-02-14 00:56:41 +00:00
gestfich.cpp Use move to trash to the project manager instead of immediate delete 2020-08-28 23:00:43 +00:00
getrunningmicrosecs.cpp Cleanup: Replace C-only deprecated headers 2019-12-05 11:03:15 -08:00
gl_context_mgr.cpp Dealing with inconsistent wxGLCanvas::IsDisplaySupported() 2018-06-11 12:26:59 +02:00
gr_basic.cpp std::min/std::max requires <algorithm> 2020-07-11 15:46:57 +02:00
gr_text.cpp Unify support for line width magic cookies. 2020-05-13 17:56:47 +01:00
grid_tricks.cpp Generate grid event when pasting into cell. 2020-08-05 01:22:29 +01:00
hash_eda.cpp Initialize variable in hash computation 2020-07-15 22:58:05 +01:00
hotkey_store.cpp Use consistent naming for project manager. 2020-07-16 01:39:29 +01:00
hotkeys_basic.cpp Implement a new settings framework across all of KiCad 2020-02-19 23:44:56 -05:00
html_messagebox.cpp Make a bunch of help dialogs modeless. 2020-08-24 23:17:33 +01:00
kiface_i.cpp Implement a new settings framework across all of KiCad 2020-02-19 23:44:56 -05:00
kiway.cpp Improve exception handling in KIWAY::Player() 2020-09-07 11:12:30 -07:00
kiway_express.cpp Support synchronous messaging over KIWAY EXPRESS. 2019-04-08 13:26:09 +01:00
kiway_holder.cpp Replace EESchema DLIST 2020-01-10 06:37:08 -08:00
kiway_player.cpp Save file / window states for kicad project locally 2020-08-24 02:01:14 +00:00
languages_menu.cpp Show an error message when switching to a language that isn't installed 2020-09-02 00:10:25 +01:00
launch_ext.cpp Fix URL launching on MacOS 2020-02-22 09:47:51 -05:00
layer_id.cpp Add PCB_LAYER_IDs to LayerName() and reformat for readability 2020-08-30 20:20:45 -04:00
lib_id.cpp Don't export libid with footprints 2020-08-28 12:33:13 -07:00
lib_table.keywords Added "enabled" parameter for LIB_TABLE_ROW 2017-11-21 08:18:06 -05:00
lib_table_base.cpp Add text variable support to envVar processing. 2020-04-05 20:52:26 +01:00
lib_tree_model.cpp #include <algorithm> so std::sort is found. 2020-05-15 10:49:43 +00:00
lib_tree_model.h Pinning for library trees in FPEditor and SymbolEditor. 2020-02-14 00:10:40 +00:00
lib_tree_model_adapter.cpp Display symbol libraries that couldn't be loaded as disabled text 2020-09-02 00:10:25 +01:00
lib_tree_model_adapter.h Migrate PcbNew project settings to new framework 2020-07-02 22:08:54 -04:00
lockfile.cpp Move file locking utilities to a separate file 2017-03-23 09:23:45 -04:00
lset.cpp Add PCB_LAYER_IDs to LayerName() and reformat for readability 2020-08-30 20:20:45 -04:00
marker_base.cpp Migrate RC_ITEM to use shared_ptr 2020-08-13 14:50:59 +02:00
msgpanel.cpp Remove colours from message text items. 2018-07-17 15:11:40 +01:00
netclass.cpp NetClass settings for Eeschema. 2020-07-08 21:23:25 +01:00
netlist.keywords ADDED properties passed between eescema and pcbnew. 2020-08-08 22:49:04 +01:00
newstroke_font.cpp Correct cyrillic 'f' in newstroke 2020-02-12 14:08:02 -08:00
observable.cpp Coverity fixes (mostly initializing variables) 2017-02-01 17:31:55 +01:00
origin_transforms.cpp Add the ORIGIN_TRANSFORMS class 2020-08-26 17:54:21 +00:00
origin_viewitem.cpp Add snapping to eeschema 2020-09-09 10:18:15 -07:00
page_info.cpp Eeschema : Add A5 sheet size 2020-07-21 00:00:36 +00:00
painter.cpp Remove a bunch of globals. 2020-04-16 17:34:46 +01:00
pcb.keywords ADDED new footprint fabrication attributes. 2020-08-28 11:05:58 +01:00
pcb_plot_params.keywords Implement changes for Sketch Pads to Fab Layers. 2020-05-01 18:49:42 +01:00
pgm_base.cpp Show an error message when switching to a language that isn't installed 2020-09-02 00:10:25 +01:00
prependpath.cpp
printout.cpp Implement a new settings framework across all of KiCad 2020-02-19 23:44:56 -05:00
project.cpp A better way of handling standalone project files 2020-08-30 16:04:39 -04:00
properties.cpp Eeschema: initial schematic I/O plugin. 2016-07-06 05:22:56 -04:00
property_mgr.cpp Hook libeval compiler up to rule parser 2020-07-20 22:11:53 +01:00
ptree.cpp Remove all debugging output that cannot be disabled. 2020-08-18 10:17:36 -04:00
rc_item.cpp Delete nodes in vector before clearing it 2020-09-01 23:26:39 +00:00
rc_item.h Migrate RC_ITEM to use shared_ptr 2020-08-13 14:50:59 +02:00
refdes_utils.cpp Fix broken GetReferencePrefix function 2019-01-30 15:41:36 -08:00
render_settings.cpp Add a min pin width advanced config for plotting. 2020-09-08 20:19:54 +01:00
reporter.cpp Better board-edge error reporting. 2020-08-17 23:55:31 +01:00
richio.cpp Uniformly quote strings which may have user content. 2019-04-07 00:24:10 +01:00
scintilla_tricks.cpp Add Ctrl+A (select all) to scintilla tricks. 2020-09-07 12:36:48 +01:00
search_stack.cpp Replace log debugging output with tracing. 2018-10-17 15:03:33 -04:00
searchhelpfilefullpath.cpp Replace log debugging output with tracing. 2018-10-17 15:03:33 -04:00
single_top.cpp Ensure the environment variables are synchronized between KiCad and Python 2020-08-09 19:56:12 +01:00
status_popup.cpp Grid rid of GetCanvas/GetGalCanvas distinction now that there's only gal. 2019-06-13 19:58:37 +01:00
streamwrapper.cpp Replace WIN32 preprocessor symbol by the official symbol _WIN32, used almost everywhere 2018-10-20 09:22:24 +02:00
string.cpp Convert smart quotes and dashes in reports to ASCII quotes and dashes. 2020-08-10 23:43:24 +01:00
strtok_r.c
systemdirsappend.cpp
template_fieldnames.cpp Unroll a level of prefs for fieldname templates. 2020-08-30 18:58:18 +01:00
template_fieldnames.h Fix some Coverity issues. 2020-04-06 12:31:59 +01:00
template_fieldnames.keywords Variable substitution framework. 2020-03-30 14:15:59 +01:00
textentry_tricks.cpp Only reserve hotkeys for focused textCtrls that are editabled. 2020-07-14 13:30:43 +01:00
title_block.cpp Refactor common QA components to create a single common library 2020-07-18 16:21:15 +01:00
trace_helpers.cpp Fix Python environment variable handling 2020-08-12 00:14:19 +01:00
undo_redo_container.cpp Convert UNDO_REDO_T to an enum class 2020-08-26 18:04:32 +00:00
utf8.cpp Many callers of uni_forward are not expecting an exception. 2020-01-13 15:40:32 +00:00
validators.cpp Allow Net Inspector to create, rename and delete nets. 2020-07-11 21:19:49 +01:00
wildcards_and_files_ext.cpp CADSTAR PCB Archive Importer: Formatting fixes 2020-09-08 21:21:21 +00:00
wxdataviewctrl_helpers.cpp Move wxDataViewCtrl manipulators out of dialog_choose_component.cpp 2017-03-30 21:47:14 -04:00
xnode.cpp Escape slashes in labels and netnames. 2019-04-07 00:24:10 +01:00