Commit Graph

53 Commits

Author SHA1 Message Date
Seth Hillbrand d07da51390 Fix copy-paste error 2023-01-11 20:37:42 -08:00
Jon Evans c530bdb5a1 Rename GetSelectMenuText to GetItemDescription
This descriptive text is used for many more things than
just the select menu these days.
2023-01-11 22:27:44 -05:00
Seth Hillbrand a206f6717d Desaturate the symbols in DNP for print/plot
The desaturation should match screen display

Fixes https://gitlab.com/kicad/code/kicad/issues/13481
2023-01-11 13:44:08 -08:00
jean-pierre charras a9d31348b1 Eeschema, print and plot: fix arc issue for lib arcs == 180 deg
Fixes #12502
https://gitlab.com/kicad/code/kicad/issues/12502
2022-09-24 10:00:21 +02:00
jean-pierre charras 78087597cd Avoid including plotters/plotter.h in many files.
It avoid a large rebuild when modifying the plot code.
2022-09-21 08:52:34 +02:00
jean-pierre charras bbaf5a21c2 Eeschema: fix a plot issue with arcs.
Arcs are really error prone, due to different Y axis orientation, and geometry transforms.
Probably we should remove plot and print functions using arc angles as parameters
that are a can of worms.
Fixes #12465
https://gitlab.com/kicad/code/kicad/issues/12465
2022-09-20 16:04:17 +02:00
Jeff Young 64a6fc0fd4 Push UNITS_PROVIDER down into a low-level mixin.
This allows us to also construct cheap UNIT_PROVIDERs for specific
tasks when necessary.
2022-09-19 17:10:59 +01:00
Marek Roszko 61e11d6896 Strip out Mils2Iu 2022-09-16 21:09:27 -04:00
Seth Hillbrand 524b129c64 ADDED: Support for explicit DNP field
Dims elements shown as DNP.  Adds property `dnp` to explicitly denote
parts that should not be populated. These parts are not included in X/Y
files
2022-09-16 22:26:16 +00:00
Mark Roszko b00178adb3 Nuke base_units from orbit 2022-09-16 04:38:10 +00:00
Jeff Young f17a865593 Move EDA_ITEM hitTest to BOX2I. 2022-08-31 17:18:45 +01:00
Jeff Young 2dc6300501 Move EDA_ITEM bounding boxes to BOX2I. 2022-08-31 10:16:55 +01:00
Jeff Young 5679b9dbdc Remove a few EDA_RECT instances. 2022-08-31 01:22:49 +01:00
Roberto Fernandez Bautista 029cc65b34 EDA_SHAPE: Remove m_upsideDownCoords hack (Fixes hitTest routine) 2022-08-27 12:51:32 +01:00
Jeff Young 1ce3744c70 Honour stroke colour in LIB_SHAPE.
Fixes https://gitlab.com/kicad/code/kicad/issues/11955
2022-07-10 10:47:22 -06:00
Jeff Young 62cef3d830 Add LAYER_PRIVATE_NOTES for private text & graphics in symbol editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/11957
2022-07-08 17:27:05 -06:00
Jeff Young dbbdc9d2e6 Don't rely on the penWidth already being set when setting the dash style.
Fixes https://gitlab.com/kicad/code/kicad/issues/11908
2022-06-29 07:34:45 -06:00
Jeff Young 4a8aaefdc0 Implement line style printing for LIB_SHAPE.
Fixes https://gitlab.com/kicad/code/kicad/issues/11883
2022-06-29 07:34:45 -06:00
Seth Hillbrand 7b9dc1b9f0 Fix Eeschema Arc plotting
The start/end point plotting is not reliable for eeschema.  We need to
preconvert to angles to get the correct winding as the default plotter
conversion in the PLOTTER class makes pcbnew-based assumptions

Fixes https://gitlab.com/kicad/code/kicad/issues/11885
2022-06-22 16:46:28 -07:00
Jeff Young d2610736ff Fix bugs with printing bordered shapes.
Fixes https://gitlab.com/kicad/code/kicad/issues/11536
2022-05-02 19:45:55 +01:00
Jeff Young 585ea85f95 LIB_SHAPE default line style is SOLID, not DASHED.
(Copy/paste error from SCH_SHAPE.)

Fixes https://gitlab.com/kicad/code/kicad/issues/11527
2022-05-02 17:22:13 +01:00
Jeff Young dc1e063b00 Iron out some issues with linestyle handling in SCH printing and plotting.
Fixes https://gitlab.com/kicad/code/kicad/issues/11498
2022-04-29 13:52:30 +01:00
Jeff Young c17b90c8dc Run pinning on sides as well as corners.
Also fixes a bug in LIB_SHAPE's Normalize() which wasn't handling the
upside-down coordinate system.

Fixes https://gitlab.com/kicad/code/kicad/issues/11339
2022-04-07 11:51:58 +01:00
Jeff Young 356d565d48 Normalize rectangular shapes before feeding to point editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/11339
2022-04-06 18:18:29 +01:00
Seth Hillbrand c686105afc Correctly order swap test
MapAngles() will modify parameters and C++ does not guarantee LTR
evaluation, so we need to separate the calls into the proper order
before comparing the returns

Fixes https://gitlab.com/kicad/code/kicad/issues/11135
2022-03-24 09:23:50 -07:00
Seth Hillbrand c9fb95b888 Fix the order of evaluation in the arc printing
MapAngles will adjust by small amounts the angles t1 and t2.  This
adjustment will determine the CW/CCW drawing.  Therefore, the MapAngles
needs to be called explicitly before the Normalize180() call.
Left-to-Right evaluation is not a given for MSVC

Fixes https://gitlab.com/kicad/code/kicad/issues/11050
2022-03-07 16:43:13 -08:00
Jeff Young 76535d8572 Make LIB_ITEM::COMPARE_FLAGS really a flags field, and add ERC.
Before they were 1/2 treated as flags and 1/2 treated as a mode enum.

The ERC flag relaxes constraints on data that is settable in the
schematic editor.

Fixes https://gitlab.com/kicad/code/kicad/issues/11018
2022-03-03 13:27:18 +00:00
Jeff Young ab5489ad30 Fix typo.
Fixes https://gitlab.com/kicad/code/kicad/issues/10390
2022-02-15 22:40:24 +00:00
jean-pierre charras 7e6829e834 Fix minor compil warnings 2022-02-12 11:43:38 +01:00
Jeff Young f11b8011cd Separate plotting into background and foreground.
Fixes https://gitlab.com/kicad/code/kicad/issues/10390
2022-02-10 20:33:06 +00:00
Jeff Young 7b84e0a7d9 Make printing/plotting/drawing of LIB and SCH arcs consistent.
Fixes https://gitlab.com/kicad/code/kicad/issues/10801
2022-02-10 00:35:24 +00:00
Jeff Young f3cd36d1d7 Bring EEschema textboxes in line with PCBNew's.
Also adds Border checkboxes and fixes a bunch of bugs.
2022-01-31 21:46:40 +00:00
Jeff Young 60bcfd1bf1 Bug fixes in arc & textbox printing.
Also removal of the no-longer-used clipping code from GR*.
2022-01-31 20:00:47 +00:00
Jeff Young c6a8100d46 Schematic and symbol text boxes.
Also fixes some plot bugs with arcs.

Also moves polygonization of arcs (when required) in plotting code
from 5 degrees to calculated based on ARC_HIGH_DEF.

Fixes https://gitlab.com/kicad/code/kicad/issues/5017
2022-01-28 21:38:15 +00:00
Seth Hillbrand cffc99e384 Don't close filled polylines when printing
Eeschema/libedit support open, filled polylines.  When printing, this
should be drawn as a fill, followed by the polyline to avoid assumptions
about closed polygons in the graphic code

Fixes https://gitlab.com/kicad/code/kicad/issues/10537

(cherry picked from commit 615eda816e)
2022-01-20 10:54:36 -08:00
jean-pierre charras 25fca2abb7 fix a minor compil warning 2022-01-18 13:49:50 +01:00
Jeff Young e61144d45a Finish with EDA_ANGLE. 2022-01-16 21:15:40 +00:00
Jeff Young 9b661aea10 EDA_ANGLE for plotters.
Also fixes a compile error in the PNS Playground.
2022-01-16 01:19:45 +00:00
Marek Roszko c4c56de708 Neurotically update position wxPoint usages 2022-01-01 11:55:51 -05:00
Jeff Young 2bc86fa0a8 Shapes for schematic.
ADDED arc, circle and rectangle shapes for schematic.  Shapes support
line styles and fill colors.

CHANGED sheet background color in Edit Text & Graphics Properties to
fill color (and it now affects shapes).

Pushed STROKE_PARAMS down into common and moved all shapes to using it
for stroke descriptions.
2021-12-23 20:36:07 +00:00
Jeff Young 160328abc7 Fix arc printing for flipped shapes. 2021-12-20 18:07:27 +00:00
Jeff Young 1bb750814d Cleanup dead code. 2021-11-17 12:49:53 +00:00
Jeff Young 969bef9a36 Fix stroking error when printing polygons. 2021-11-17 01:53:44 +00:00
Jeff Young 7760d3275d Fix printing of LIB_SHAPE arcs. 2021-11-17 01:39:16 +00:00
Jeff Young 20328ab331 Back out last arc change. 2021-11-17 01:03:22 +00:00
Jeff Young b4ac53d93d Attempt #1 to fix LIB_SHAPE arc printing. 2021-11-17 00:34:05 +00:00
Wayne Stambaugh bf85ddd577 Eeschema: fix bug printing polygon (possibly other) filled shapes. 2021-11-01 16:09:32 -04:00
Jeff Young cec788d454 Must use GetEffectivePenWidth for output.
Fixes https://gitlab.com/kicad/code/kicad/issues/9504
2021-11-01 14:49:12 +00:00
Jeff Young 5f8e0ef1e0 Patch up arc hit-testing and printing for 6.0
This could use another look when we're not so near release.  We
really shouldn't need to special case eeWinding vs. not eeWinding.

Fixes https://gitlab.com/kicad/code/kicad/issues/9491
2021-10-30 15:10:07 +01:00
Wayne Stambaugh 1e1da55840 Coverity fixes. 2021-10-19 07:42:27 -04:00