Commit Graph

516 Commits

Author SHA1 Message Date
Jeff Young e03b06927d Fix rotation problems for knockout fp text, and implement 3D rendering.
Fixes https://gitlab.com/kicad/code/kicad/issues/11086
2022-03-12 14:17:52 +00:00
jean-pierre charras 0440aa3d83 Extend layer LAYER_LOCKED_ITEM_SHADOW to draw shadow markers on other locked items:
tracks, texts, graphics.
2022-03-09 18:50:31 +01:00
jean-pierre charras 016af235db Pcbnew: add a GAL layer (LAYER_LOCKED_ITEM_SHADOW) to draw markers on locked footprints 2022-03-09 17:54:58 +01:00
Jeff Young 40fd8860fe Plotting (and some bug fixes) for knockout text. 2022-03-08 18:06:41 +00:00
Jeff Young 293021c58c ADDED: knockout pcb and fp text.
Fixes https://gitlab.com/kicad/code/kicad/issues/7055
2022-03-08 13:22:20 +00:00
Jeff Young bf0f2aa4a8 Adjust bitmap text spacing a bit so it's closer to the stroke font.
This helps the text better match the highlighting when it gets small
enough that we switch to the bitmap font for performance.
2022-03-07 20:30:50 +00:00
Jeff Young 513486b0ec Overhaul show no-net indicators logic.
It doesn't appear that it was ever finished the first time around.

Fixes https://gitlab.com/kicad/code/kicad/issues/11020
2022-03-02 18:28:39 +00:00
Jeff Young 69a6033905 Hysteresis for track netnames.
Fixes https://gitlab.com/kicad/code/kicad/issues/10416
2022-02-28 21:11:01 +00:00
Jeff Young 5544dd8018 Don't call GetLayer() on a multi-layer object. 2022-02-21 00:08:43 +00:00
Jeff Young bc24002be7 Don't print clearance lines.
Fixes https://gitlab.com/kicad/code/kicad/issues/10883
2022-02-17 23:59:09 +00:00
Jeff Young 2172810600 Performance: better sharing of zone fills. 2022-02-15 19:19:03 +00:00
jean-pierre charras a455dd8815 Fix issue for stand alone python scripts, when running without project. 2022-02-14 18:58:55 +01:00
Jeff Young a2ca8cf413 Improve SNR. 2022-02-12 18:38:11 +00:00
Jeff Young 3deaf902bb Retire the V5 zone fill algorithm.
Fixes https://gitlab.com/kicad/code/kicad/issues/10578
2022-02-11 13:10:52 +00:00
Jeff Young 7ccac79192 More wxString wide literals. 2022-02-05 21:29:34 +00:00
Jeff Young 5739505aa3 TextBoxes for PCBNew. 2022-01-31 20:00:47 +00:00
Jeff Young 09d0f6e17c Map zone layers before checking their visibility.
Fixes https://gitlab.com/kicad/code/kicad/issues/10509
2022-01-21 23:26:10 +00:00
Jeff Young 4e493e2cbc Clean up some more deci-degrees. 2022-01-18 14:08:47 +00:00
Jeff Young 2defd8d911 Move show-bounding-boxes to a tool on the toolbars. 2022-01-17 11:56:40 +00:00
Jeff Young e84c574830 Some more EDA_ANGLE cleanup. 2022-01-16 19:16:18 +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
Jeff Young 07013d00e1 More EDA_ANGLE. 2022-01-14 16:08:19 +00:00
Jeff Young abd3f5bc2b Move footprints to EDA_ANGLE. 2022-01-14 16:08:18 +00:00
Jeff Young e048e51f5d Improve SNR of EDA_ANGLE stuff. 2022-01-14 16:08:18 +00:00
Jeff Young 8f7d2dd06a More VECTOR2D -> VECTOR2I and wxPoint cleanup. 2022-01-11 14:20:14 +00:00
Marek Roszko fcfe42d67c Continue the war on wxPoint 2022-01-10 19:52:26 -05:00
Jeff Young 27c967421c Commenting and "auto" reduction. 2022-01-08 16:47:45 +00:00
Jeff Young eb58d7e44c Text glyph caches and bug fixes.
1) Unify metrics between stroke and outline fonts
2) Unify handling of rotation and mirroring
3) Bug fixes in collision handling
4) Use of VECTOR2I (instead of VECTOR2D) for world-coordinates
5) Generate outline font overbar with rounded ends and fix rotation
bugs
6) Generate wxEVT_CHOICE events from FONT_CHOICE::SetFontSelection
7) Change text-item PNS SOLIDs to use compound shapes
2022-01-08 16:47:45 +00:00
Marek Roszko e4dbfcd92d Swap out some wxSize for VECTOR2I 2022-01-04 20:42:27 -05:00
jean-pierre charras c2b54faceb CvPcb: fix crash due to a null pointer: pcbconfig() can return null.
CvPcb has no config option and pcbconfig() returns nullptr.
In this case use default settings.
Fixes #10250
https://gitlab.com/kicad/code/kicad/issues/10250
2022-01-04 14:51:32 +01:00
Jon Evans 0e2f79ad8d Fix highlighting color logic when net colors are active
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10157

(cherry picked from commit 134b09004b)
2022-01-02 12:11:58 -05:00
Jeff Young 89c0f8e297 Move to new font engine. 2022-01-02 14:57:03 +00:00
Marek Roszko ea613cf448 Another batch of point changes 2022-01-01 13:17:12 -05:00
Marek Roszko c4c56de708 Neurotically update position wxPoint usages 2022-01-01 11:55:51 -05:00
Marek Roszko 347e03363a Convert wxPoint/wxSize starting from EDA_RECT usages 2022-01-01 11:30:33 -05:00
jean-pierre charras 480a548171 PCB_PAINTER: do not show track arc clearance when not needed
fix also a minor compil warning.
Fixes #10137
https://gitlab.com/kicad/code/kicad/issues/10137
2021-12-30 09:21:35 +01:00
Jeff Young 86cb57f4a7 Cherry-pick TEXT_ATTRIBUTES and EDA_ANGLE from rockola/kicad-strokefont 2021-12-28 22:15:20 +00:00
Jeff Young 5e4a704155 Remove some more duplicated preferences.
Fixes https://gitlab.com/kicad/code/kicad/issues/10112
2021-12-26 13:37:28 +00:00
Jeff Young 933b82495d Use ISO 128-2 values for dashed line defaults. 2021-12-25 14:00:57 +00:00
Jeff Young d649b288a6 Swap out autoplace rotation costs for private footprint layers.
Fixes https://gitlab.com/kicad/code/kicad/issues/2291

Fixes https://gitlab.com/kicad/code/kicad/issues/5391
2021-12-24 21:10:28 +00:00
Jeff Young fa908e1f98 Dimensions for footprints.
Fixes https://gitlab.com/kicad/code/kicad/issues/8441
2021-12-24 21:10:28 +00:00
Jeff Young 23194dbe54 User-settable high-contrast dimming factor.
ADDED user-settable high-contrast dimming factor.

Fixes https://gitlab.com/kicad/code/kicad/issues/6922
2021-12-24 17:38:55 +00:00
Jeff Young 58d4ac2a97 Keep netnames on tracks within the viewport when possible.
Fixes https://gitlab.com/kicad/code/kicad/issues/2032
2021-12-24 17:11:01 +00:00
Jeff Young 9ee28ea8f5 Flatten out some more preferences. 2021-12-24 15:43:20 +00:00
Jeff Young f1410f0240 Line styles for PCBNew shapes.
Fixes https://gitlab.com/kicad/code/kicad/issues/2150
2021-12-24 12:36:59 +00:00
Jeff Young ef10b36948 Add mask-to-copper clearance parameter and rename mask margin. 2021-12-24 12:36:41 +00:00
Jeff Young 4b6bf3095a Radial dimensions.
ADDED radial type dimensions.

Fixes https://gitlab.com/kicad/code/kicad/issues/2056
2021-12-23 19:34:54 +00:00
Jeff Young a1c8e36c99 Scale markers somewhat proportionally to zoom.
Fixes https://gitlab.com/kicad/code/kicad/issues/10048
2021-12-23 16:54:03 +00:00
jean-pierre charras f5246acf37 PCB_PAINTER: draw PAD do not always replace netname by "x".
When a pad net is edited inside the board editor, its netname is no longer
its corresponding pin netname.
Fixes #9795
https://gitlab.com/kicad/code/kicad/issues/9795
2021-11-28 14:34:26 +01:00
Jeff Young 393c84e67a Fix sketch mode rendering of beziers.
Fixes https://gitlab.com/kicad/code/kicad/issues/9522
2021-11-04 12:57:16 +00:00
Jeff Young f724fe7eff Move bbox padding to RTrees so it doesn't interfere with hittesting.
Fixes https://gitlab.com/kicad/code/kicad/issues/9361
2021-10-26 13:46:30 +01:00
Jeff Young f9861b4a6c Finish arc rework and push out to file formats. 2021-10-15 12:45:43 +01:00
Jeff Young 9b9e379aa0 Overhaul arc internal model to not over-specify information. 2021-10-15 12:45:43 +01:00
Jeff Young 7b07b1650c Don't draw titlebar for untitled groups.
Fixes https://gitlab.com/kicad/code/kicad/issues/9181
2021-09-17 22:01:17 +01:00
Jeff Young fdd9df6dff Linear brightening doesn't work well for colours near white. 2021-09-16 14:17:52 +01:00
Wayne Stambaugh 3b16c38756 Coverity issue fixes.
Fix Coverity issues 157138, 338547, and 338716.
2021-09-08 14:51:27 -04:00
Wayne Stambaugh 4ee0b28ffc Coverity issue fixes.
Fix Coverity issues 338623, 338716, and 338717.
2021-09-07 13:38:56 -04:00
Seth Hillbrand c816168e42 Fix crash when drawing item
When drawing before commit, the items do not have a board and therefore
no BDS.  In these cases, take a decent default until committed
2021-09-07 09:08:44 -07:00
Jeff Young 9cf7c7800b Use same text positioning algorithm in LibEdit and Eeschema.
Also fixes some uninitialized variables in PCB painter.

Fixes https://gitlab.com/kicad/code/kicad/issues/8947
2021-09-07 12:33:06 +01:00
Jeff Young 1792a985a7 Use board's maxError value when possible. 2021-09-07 00:14:18 +01:00
jean-pierre charras 36048fa436 OPENGL_GAL::DrawArcSegment(): use a better number of segm to approximate the arc.
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 #9101
https://gitlab.com/kicad/code/kicad/issues/9101
2021-09-06 16:36:47 +02:00
Jeff Young 59c15842f8 Exclude formatting chars from text width approximation.
Fixes https://gitlab.com/kicad/code/kicad/issues/9080
2021-09-04 22:09:32 +01:00
Jeff Young e6ca9837a2 Clear numbers from non-numberable pads and don't run DRC on them.
This was also the last straw on the misnamed PAD::GetName() and
PAD::SetName(), which are now PAD::GetNumber() and PAD::SetNumber().

Fixes https://gitlab.com/kicad/code/kicad/issues/9017
2021-08-24 01:03:06 +01:00
Jeff Young 1a252b4f96 Add a compile error for ill-defined rules, and more performance.
Also adds const-safety to GetBoard().
2021-08-16 12:14:17 +01:00
Jeff Young 8b9161b27d Be more careful with alpha value.
Fixes https://gitlab.com/kicad/code/kicad/issues/8850
2021-08-02 18:24:16 +01:00
Jeff Young 6aaf4413b3 Fix kicad_string.h / string.cpp mismatch.
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.
2021-07-29 16:03:25 +01:00
Jeff Young f221220fe2 Rename layer ids file.
It hasn't had anything to do with colors or visibility for some time
now.
2021-07-29 16:03:25 +01:00
david-beinder c0f12cf8b0 PCB painter: skip early to polygon algo in outline mode 2021-07-28 10:37:56 +00:00
Jeff Young e62969d007 Move zone fracture display mode to AdvancedCfg, and add triangulation.
Fixes https://gitlab.com/kicad/code/kicad/issues/8762
2021-07-26 18:57:35 +01:00
Jeff Young 0fb864d596 Pull some name changes back from 7.0 to ease merging. 2021-07-21 20:58:59 +01:00
Wayne Stambaugh cf00319c85 More NULL expunging. 2021-07-20 07:27:18 -04:00
Jeff Young e61822c9e0 Naming conventions and a bug fix on arc points. 2021-07-19 13:17:12 +01:00
Jeff Young 625006ca30 Remove front/back SMD pad color now that we have opacity sliders.
Fixes https://gitlab.com/kicad/code/kicad/issues/8761
2021-07-10 10:13:55 +01:00
Jon Evans cafd42911e Do not use opacity for zone outlines
The opacity is intended to aid seeing through
zone filled areas and applying it to outlines
makes them hard to see and select.
2021-07-07 22:04:11 -04:00
jean-pierre charras fa49b54f93 Fix minor issue in TransformCircleToPolygon() when aError is set to a large value.
pcb_painter.cpp: add (but not activate) compil option to show the conversion
of SHAPE_ARC::ConvertToPolyline as segments, for debug purposes.
2021-06-28 15:50:16 +02:00
jean-pierre charras 310adedf85 Add GetCircleToSegmentError() to geometry/geometry_utils.
This function returns the error created by a circle to segment approximation.
2021-06-26 18:57:07 +02:00
jean-pierre charras 31d7a0a8d1 TransformArcToPolygon(): slightly better approximation of arc.
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)
2021-06-25 18:46:16 +02:00
Wayne Stambaugh 27e9750507 Pcbnew: fix footprint selection bug.
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
2021-06-23 19:46:33 -04:00
Jeff Young 5fa5a73c6d File open/import progress dialogs.
Fixes https://gitlab.com/kicad/code/kicad/issues/6864

Fixes https://gitlab.com/kicad/code/kicad/issues/2166
2021-06-23 23:55:54 +01:00
Jeff Young ae612a454e Make blind via rendering more intuitive by putting top on top...
bottom on bottom, and the via colour larger.
2021-06-22 18:24:46 +01:00
jean-pierre charras 9fb77473cd pcb_painter.cpp: fix incorrect shape of CHAMFERED_RECT pads with negative clearance.
Negative clearance (for instance on mask or paste layer) was not taken in account
2021-06-21 18:52:57 +02:00
jean-pierre charras 00b4134eb8 pcb_painter.cpp: fix incorrect shape of ROUNDRECT pads with negative clearance.
If a negative clearance (for instance on mask or paste layer) is set to more
than the corner radius, the drawn shape was broken (fully incorrect size)
2021-06-21 13:44:30 +02:00
Jeff Young 096e342386 Prefix TRACK, ARC and VIA. 2021-06-11 22:07:02 +01:00
Jeff Young 16b0147af8 Prefix DIMENSION types. 2021-06-11 17:59:44 +01:00
luz paz f968fc8719 Fix source comment / documentation typos 2021-06-09 19:32:58 +00:00
Jeff Young 97a2c4094b Don't label free pads with connections as '*'.
Fixes https://gitlab.com/kicad/code/kicad/issues/8385
2021-06-07 23:36:37 +01:00
Marek Roszko 10e60acf34 Clean up including of board_design_settings.h 2021-06-06 15:03:42 -04:00
Jeff Young 688ee18989 Don't apply margin to "interior" shapes in a shape-set.
Fixes https://gitlab.com/kicad/code/kicad/issues/8345
2021-05-03 12:12:03 +01:00
Marek Roszko 03cf2b517f Enum class PAD_ATTR_T
Renamed such that python stays the same
2021-05-01 10:51:54 -04:00
Marek Roszko b243c2280d enum class PAD_SHAPE_T 2021-05-01 08:22:35 -04:00
Marek Roszko 21fde9b629 enum class PCB_SHAPE_TYPE_T 2021-04-30 22:36:12 -04:00
Jeff Young 55d2d0d93e Fix some bugs in file save as.
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
2021-04-13 13:34:40 +01:00
Jeff Young 7d58c53e42 Apply new hole-dimming logic to via pads.
Fixes https://gitlab.com/kicad/code/kicad/issues/8144
2021-04-11 17:51:38 +01:00
Jeff Young 29e5882637 Fix typo (found by Coverity). 2021-04-11 10:32:15 +01:00
Jeff Young 675444a646 Dim hole walls that don't pass through high-contrast layers.
Fixes https://gitlab.com/kicad/code/kicad/issues/8144
2021-04-10 22:41:38 +01:00
Jeff Young a8b40bf683 Avoid Clipper when possible.
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
2021-04-08 22:37:14 +01:00
Jeff Young 4034fcb7ac Fix yet another edge case in B&W printing of holes.
Fixes https://gitlab.com/kicad/code/kicad/issues/7944
2021-03-18 23:50:04 +00:00
Jeff Young cad1cb0262 Improve naming. 2021-03-16 12:07:06 +00:00
Mikolaj Wielgus c3c3649211 Stop text from causing a shift during flip when >1 items are selected
1e1be730 fixed this only for one item.

Fixes https://gitlab.com/kicad/code/kicad/issues/7304
2021-03-15 21:24:16 +00:00
Dominik Wernberger e2aa7be4b3 Added a lot of consts and refactored a few lines 2021-03-08 12:49:48 -08:00