kicad/pcbnew/exporters
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
..
board_exporter_base.h pcbnew: Hyperlynx Exporter - initial version 2019-04-08 02:56:02 +02:00
export_d356.cpp Add rectangle tool to PCBNew toolbar in favour of Aux Origin. 2020-07-01 13:31:30 +01:00
export_d356.h ADDED: Allow exporting IPC-356D netlists from Python 2020-02-04 13:31:56 +00:00
export_footprint_associations.cpp Convert timestamps to UUIDs. 2020-02-20 21:29:52 +00:00
export_footprints_placefile.cpp ADDED new footprint fabrication attributes. 2020-08-28 11:05:58 +01:00
export_footprints_placefile.h ADDED new footprint fabrication attributes. 2020-08-28 11:05:58 +01:00
export_gencad.cpp Remove more dead code (mostly includes). 2020-08-31 17:29:44 +01:00
export_hyperlynx.cpp Cleanup some dead code and make better use of iterators. 2020-08-28 11:05:58 +01:00
export_idf.cpp Resolve text vars when exporting IDF. 2020-08-22 22:08:32 +01:00
export_vrml.cpp Clean up arc/circle polygonization. 2020-09-11 11:23:49 +01:00
export_vrml.h added vrml export via python api 2020-08-28 16:41:09 +00:00
gen_drill_report_files.cpp Introduce new KI_FALLTHROUGH macro 2020-04-25 00:44:09 +01:00
gen_footprints_placefile.cpp ADDED new footprint fabrication attributes. 2020-08-28 11:05:58 +01:00
gendrill_Excellon_writer.cpp Drill files export: ensure the Top to Bottom PTH drill file is always created, 2020-09-10 16:42:04 +02:00
gendrill_Excellon_writer.h Removed const modifier for returned non-reference types 2020-07-05 22:44:38 +02:00
gendrill_file_writer_base.cpp Drill files export: ensure the Top to Bottom PTH drill file is always created, 2020-09-10 16:42:04 +02:00
gendrill_file_writer_base.h Removed const modifier for returned non-reference types 2020-07-05 22:44:38 +02:00
gendrill_gerber_writer.cpp Drill files export: ensure the Top to Bottom PTH drill file is always created, 2020-09-10 16:42:04 +02:00
gendrill_gerber_writer.h Drill files generation: add 3 structured comments in NC (Excellon) drill files and remove duplicate code. 2018-11-24 08:51:58 +01:00
gerber_jobfile_writer.cpp Cleanup some dead code and make better use of iterators. 2020-08-28 11:05:58 +01:00
gerber_jobfile_writer.h Switch to ordered_json and enable ignore_comments parser option 2020-08-02 13:11:16 +00:00
gerber_placefile_writer.cpp ADDED new footprint fabrication attributes. 2020-08-28 11:05:58 +01:00
gerber_placefile_writer.h ADDED: Pcbnew, add "pin function" (pin name in eeschema) to pads. 2019-11-23 09:12:43 +01:00