Commit Graph

5473 Commits

Author SHA1 Message Date
Mark Roszko f0f33ef1d3 Introduce sentry for crash data collection 2022-04-02 01:21:55 +00:00
markus-bonk 1a9ef4bd0f Add support for using a SpaceMouse to pan & zoom in the schematic editor. 2022-03-31 19:03:41 +00:00
Jeff Young e8a543f1ea Colors for text in PL_Editor and Eeschema.
Fixes https://gitlab.com/kicad/code/kicad/issues/1952
2022-03-31 19:43:56 +01:00
Wayne Stambaugh c0d8657d97 Plot on all layers prep work.
We only need one bottom to top layer sequence definition.

Plot a sequence of layer IDs (LSEQ) in the order of the sequence.

Add helper method to layer set (LSET) to create a sequence of layer IDs
using another sequence for ordering.
2022-03-29 16:08:23 -04:00
Mike Williams 2a726a882f Schematic: new feature, force 45 degree lines
* New modes to force 45 deg angle at beginning or end of line

* Backspace will undo most recent segment added

* / will toggle posture of 90 and 45 degree lines

* Added alg::signbit for convenience

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10869
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/9175
2022-03-28 16:07:23 -04:00
Mike Williams e51ab86225 Schematic Drag: fixes and improvements
Fixes:
* Various special cases around junctions on pins and dragging.

* Some rotations of endpoints resulting in a 45 degree rotate.

* Some cases where it was possible to get a line with neither
  endpoint selected, and also substractive unselecting only one of two
  selected endpoints unselecting both.

* Use line midpoint for sorting.  Start and endpoints aren't
  consistent in the order they appear on the X or Y axis. So,
  we need to use the midpoint for our position for consistent
  sorting when dragging groups of parallel lines where some
  have the start and end reversed.

Other:
* Rename TEMP_SELECTED TO SELECTED_BY_DRAG. This is the actual meaning
  of the flag, and should reduce confusion as
  to when it should be used.

* Move usage of TEMP_SELECTED as an algorithmic mark to CANDIDATE
  instead.

* Fix mistaken clearing of START_POINT and ENDPOINT.

* Move endpoint setting and clearing out of narrowSelection, and into
  selectPoint and selectMultiple.

* Don't show dangling end warnings on new lines
2022-03-28 16:02:48 -04:00
Jeff Young d5533e7999 ADDED unit-filtering for pin table.
Fixes https://gitlab.com/kicad/code/kicad/issues/9382
2022-03-26 11:53:48 +00:00
Jeff Young 92a229eec7 ADDED separate user-defined color for page limits.
Fixes https://gitlab.com/kicad/code/kicad/issues/5271
2022-03-24 14:11:41 +00:00
jean-pierre charras 21144481d2 PLOTTER: do not clamp coordinates to an arbitrary value.
Previously, coordinates were clamped to +- 60 inches. It makes no sense to
clamp them at plotter level: max cooed depends on the editor (schematic/board...)
Rename MAX_PAGE_SIZE_MILS to MAX_PAGE_SIZE_EESCHEMA_MILS and use it only for Eeschema.
Fixes #11196
https://gitlab.com/kicad/code/kicad/issues/11196
2022-03-22 10:32:36 +01:00
Seth Hillbrand 9722a05820 Attempt to fix the Mac DPI grid mixing
When moving windows between monitors on Mac that changes the DPI, we
observe incorrect re-sizing of columns and rows.  This attempts to
rectify the situation by avoiding DPI changes for Mac builds.

Fixes https://gitlab.com/kicad/code/kicad/issues/10586
2022-03-22 00:02:05 +00:00
Jeff Young 4f62960334 Update message panel from PCB point editor and SCH drawing tools.
Fixes https://gitlab.com/kicad/code/kicad/issues/11186
2022-03-21 10:32:36 +00:00
jean-pierre charras 09d8ac7d7c Zoom wxChoice in horizontal toolbar: display the actual or nearest zoom level. 2022-03-20 18:41:38 +01:00
Seth Hillbrand 442aae19d9 Separate flashing check for connectivity
When building the connectivity database, we should not be using the
connectivity to check for shapes.

To make this deterministic, we introduce two flags (ALWAYS_FLASH and
NEVER_FLASH) that are used with connectivity building to determine
whether a pad is flashed for connectivity or not.  ZONE <-> PAD/VIA
connectivity will be checked with ALWAYS_FLASHED and all other
connectivity will be checked with NEVER_FLASHED if they are marked for
potential annular ring removal.  If they are not marked for removal,
they will be checked ALWAYS_FLASHED.

Fixes https://gitlab.com/kicad/code/kicad/issues/11114
2022-03-16 17:30:01 -07:00
Jeff Young e68e2e973e Separate Line Properties dialog from Bus/Wire, and handle Junctions in Bus/Wire.
Fixes https://gitlab.com/kicad/code/kicad/issues/9979
2022-03-16 14:56:32 +00:00
Jeff Young ce21da8cbb Select all when UNIT_BINDER is a token rather than a string.
Fixes https://gitlab.com/kicad/code/kicad/issues/9757
2022-03-16 14:56:32 +00: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
jean-pierre charras e7f379c31d Pcbnew, Knockout texts: fix issues seen with rotated texts.
Fixes #11085
https://gitlab.com/kicad/code/kicad/issues/11085
2022-03-09 11:22:05 +01: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
Jon Evans 6d82490b59 Add dark mode assets for text properties; teardrops
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10754
2022-03-07 23:15:54 -05:00
Ola Rinta-Koski 6196f2bdf0 Version info: report all font libraries 2022-03-07 14:01:37 +00:00
Jon Evans cb6d6d7ef4 Settings: allow multiple project access from Python standalone
We can't handle this in the UI, but we can externally, so allow
it for Python scripting and eventually we'll use this in the UI
also...

Fixes https://gitlab.com/kicad/code/kicad/-/issues/10540

(cherry picked from commit 1394509734)
2022-03-05 13:04:19 -05:00
Seth Hillbrand cd7141fd10 Cache read arc data for stability
Arcs can be altered by the process of changing from on-disk
representation to in-memory representation.  Saving back to disk without
modifying the arc should not modify the calculated values.

This stores a copy of the on-disk representation that is only used to
save back to disk in the event that the arc is not modified during
editing.

Fixes https://gitlab.com/kicad/code/kicad/issues/10442
2022-03-04 15:20:31 -08:00
Seth Hillbrand 548936bb22 Fix broken unit select context menu
The fix for https://gitlab.com/kicad/code/kicad/issues/10529 kicked the
subsequent IDs for unit selection off the maximum ID value for popup
menus.  This increases the maximum popup number (integers are free)

(cherry picked from commit 79b6991d7b)
2022-03-02 16:33:28 -08:00
Jeff Young 6b806bbe9c Make sure Cleanup handles shapes other than segments.
Fixes https://gitlab.com/kicad/code/kicad/issues/10955
2022-03-02 18:28:39 +00:00
Jeff Young b55bda8d6f Font support for drawing sheet editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/10306
2022-02-28 18:05:26 +00:00
Jeff Young d299ddbc7e Cleanup. 2022-02-27 12:05:39 +00:00
Jeff Young 98f4b1d16c Make gcc (or linux?) happy. 2022-02-26 22:56:10 +00:00
Jeff Young 941d7f94ad Use safer UTF8 conversion routines to prevent crashes.
Fixes https://gitlab.com/kicad/code/kicad/issues/10982
2022-02-26 19:03:00 +00:00
qu1ck b06c2585d9 Change GetEffectiveTextShape() to return outline
instead of triangulated polygon
2022-02-26 00:55:07 +00:00
Jeff Young 107067ad05 On-the-fly translations for Grid and Zoom menus.
Fixes https://gitlab.com/kicad/code/kicad/issues/10961
2022-02-25 17:36:35 +00:00
Jeff Young bc51c89c90 Reconcile zone-auto-fill with undo. 2022-02-25 13:05:49 +00:00
Jeff Young d465eb6425 ADDED: automatic zone refilling.
This is for the out-of-box experience for novice users.  It is presumed
that folks with larger more complicated boards will turn it off.

Fixes https://gitlab.com/kicad/code/kicad/issues/6413
2022-02-24 18:16:45 +00:00
Jeff Young cb16ad7557 Debounce layer visibility buttons and fix issues with FP Editor. 2022-02-23 17:52:08 +00:00
Jeff Young 41f6e634c6 Partially integrate grid snapping with constraints.
Fixes https://gitlab.com/kicad/code/kicad/issues/10941
2022-02-22 22:19:55 +00:00
Marek Roszko 0b46c75197 Simplify locale data path setting... 2022-02-21 13:08:29 -05:00
Marek Roszko ad251b7b8c Simplify KICAD6_TEMPLATE_DIR default
The search_stack method is bugland

Fix https://gitlab.com/kicad/code/kicad/-/issues/10119
2022-02-21 12:22:23 -05:00
jean-pierre charras d2cf68bcdd Plotters: add plot Arcs using EDA_SHAPE or center, start point and end point.
It avoid trying to calculate arc angles (start, end or arc angle) that
frequently create issues due to reverse Y axis, plot mirrored and/or
angle normalization with different criteria.
Fixes #10914
https://gitlab.com/kicad/code/kicad/issues/10914
2022-02-20 17:17:20 +01:00
Jeff Young d9507dbaf4 We handle variable replacements elsewhere.
The markup parser needs to ignore them so they get rendered when we're
not doing replacement.
2022-02-15 23:05:22 +00:00
Jeff Young 8e26946567 Don't shrink progress reporter when message changes; only grow. 2022-02-15 19:19:02 +00:00
Jeff Young 98b9c6e2a1 Better progress reporting and a slight performance boost on commit. 2022-02-15 12:20:34 +00:00
Mike Williams 9c59c4ee12 Schematic: orthogonal drag bends should depend on move direction
Prevents overlapping lines when possible.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10844
2022-02-14 22:52:34 +00:00
jean-pierre charras f8d6dd1efd Gerbview: fix a long standing issue: negative objects are now correctly printed. 2022-02-12 11:44:34 +01:00
dsa-t 68655540eb Clamp cursor to limits of coordinates representation
Also improves large distance handling.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8846
2022-02-11 16:42:52 +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
Werni 946f62d949 Add separate wildcard for OrCAD netlists 2022-02-11 09:24:20 +00:00
Jeff Young 082c6f5bd6 Make sure plotter uses default font when specified. 2022-02-10 20:33:06 +00:00
Mike Williams a5e8575091 Eeschema: Implement orthogonal dragging
Fixes https://gitlab.com/kicad/code/kicad/-/issues/1956
2022-02-10 18:38:40 +00:00
Jeff Young 2250211ebf More wxT-ification. 2022-02-09 17:04:32 +00:00
Ola Rinta-Koski 44c93e48e9 Markup parser fix: subscript/superscript/overbar handling 2022-02-08 18:50:53 +00:00
Jeff Young 5ce559176d Overhaul the font metrics calcs for overbar, italics and bboxes. 2022-02-07 17:36:40 +00:00
jean-pierre charras a37a7aa1d5 move a misplaced include 2022-02-07 08:22:43 +01:00
Marek Roszko 1f8d101b1d Fix color4d distance return type 2022-02-06 21:05:44 -05:00
Seth Hillbrand 57df1b469a Allow dialogs to force evaluation of UNIT_BINDER
When setting previous values, we don't get the "OnFocus" event, so the
evaluation would not get triggered by simply repeating (using the
keyboard)

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

(cherry picked from commit 4c81307391)
2022-02-04 10:04:54 -08:00
Jeff Young 42917874dd Add duplicated items to parent group.
Fixes https://gitlab.com/kicad/code/kicad/issues/10155
2022-02-04 14:26:57 +00:00
jean-pierre charras ac7cbcce61 WX_GRID: highlight the selected cell after selection by tab or arrow keys.
Fixes #9290
https://gitlab.com/kicad/code/kicad/issues/9290
2022-02-04 12:36:27 +01:00
Seth Hillbrand 3badd53a96 Setup selection when repeating
We need the item to be currently selected when repeating the last symbol
insert.  This ensures we have a valid selection before starting the move
tool and possibly getting odd system behavior from mouse positions

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

(cherry picked from commit 7642a9db79)
2022-02-03 17:09:59 -08:00
Jeff Young 0634cf261a Don't try to move bounding box caches. 2022-02-01 21:55:09 +00:00
Jeff Young 63a3b1e20a Estimate outline font thickness for DRC readability checks. 2022-02-01 12:01:04 +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 5739505aa3 TextBoxes for PCBNew. 2022-01-31 20:00:47 +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
jean-pierre charras 2900910cdd fix a qa test after code change. 2022-01-29 15:22:06 +01: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
Jeff Young 3409783d9f Break sch_text.h/.cpp into sch_text and sch_label.
Also moves SCH_NETCLASS_FLAG to SCH_DIRECTIVE_LABEL, and remaps Altium
harnesses from SCH_TEXT to SCH_DIRECTIVE_LABEL.
2022-01-28 21:38:15 +00:00
Jeff Young 0036f44e37 Support (and save/recall) zoom in/out in Custom Rules editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/5796
2022-01-28 21:38:15 +00:00
jean-pierre charras 5b8eb8f9ec SVG plotter rework: use mm as units in file. Remove useless inch option.
Use 4 digits in mantissa as default and when exporting SVG.
Allow 0 as line width: this is the right value to draw filled shapes with no outline thickness.
2022-01-28 19:33:51 +01:00
markus-bonk b263e89dfe Enable 3D mouse support in Footprint viewer.
The 3D mouse support is  moved from PCB_EDIT_FRAME to PCB_BASE_FRAME.
This allows all PCB_BASE_FRAME derived windows to have 3D mouse enabled
2D navigation support.
2022-01-28 12:21:42 +00:00
markus-bonk 47603fbc76 Wx_view_controls: Allow two input devices to simultaneously pan & zoom
Instead of the mouse move and zoom algorithms calculating the new
position or scale values relative to a starting value, the new values
are calculated relative to the current values. This allows the user to
use a second input device to move or zoom the view at the same time
without its change being undone by the mouse.
2022-01-28 12:21:42 +00:00
Jeff Young dcf0928671 Formatting. 2022-01-23 18:14:07 +00:00
Marek Roszko 0fc8197474 Add the new icon_kicad_nightly to the png build 2022-01-23 09:21:06 -05:00
jean-pierre charras 1b42152ba0 Teardrops: store parameters in BOARD_DESIGN_SETTINGS. 2022-01-23 10:57:08 +01:00
Jeff Young 6dc8cd3f18 Add FreeType version to version info.
Fixes https://gitlab.com/kicad/code/kicad/issues/10393
2022-01-21 13:21:21 +00:00
Jeff Young 854987f663 Remove unit-less angles from geometry manager APIs. 2022-01-20 21:10:04 +00:00
Jeff Young fbab335128 Retire DPOINT and DSIZE. 2022-01-20 21:10:04 +00:00
Jeff Young 67eb3116ce Remove DPOINT from drawing sheet stuff. (Use VECTOR2D instead.) 2022-01-20 21:10:04 +00:00
Seth Hillbrand 4c8f556b80 Prevent UI updates from changing zoom selection
The zoom selection should only change when requested by the user, not in
response to UI updates.  This can cause unexpected zoom shifts when the
calculated zoom is within a range of one of the presets.  It also adds
unneeded calls during the UI update cycle

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

(cherry picked from commit 6810479a19)
2022-01-20 10:10:06 -08:00
Jeff Young 9d5322cfdf Move rotation angle increments to UNIT_BINDER and EDA_ANGLE. 2022-01-19 15:15:33 +00:00
Jeff Young 0091c76a6f Excise deci-degrees from UNIT_BINDER.
Fixes https://gitlab.com/kicad/code/kicad/issues/10495
2022-01-19 00:10:32 +00:00
Jeff Young d4ff829c26 Trace logging for fonts. 2022-01-18 14:08:47 +00:00
Jeff Young e37ca2f757 Remove dead code. 2022-01-18 01:40:03 +00:00
Thomas Pointhuber 2cc9517cfd altium: Allow extraction of names of footprints stored in *.PcbLib file
See: https://gitlab.com/kicad/code/kicad/-/issues/10274
2022-01-17 19:51:51 +01:00
Jeff Young 2defd8d911 Move show-bounding-boxes to a tool on the toolbars. 2022-01-17 11:56:40 +00:00
Jeff Young 5cc3368b14 Fix bounding boxes and hittesting for arcs in eeschema. 2022-01-16 23:54:59 +00:00
Jeff Young e61144d45a Finish with EDA_ANGLE. 2022-01-16 21:15:40 +00:00
dsa-t bc1ff6756f Cross-probing/selection for multiple items (SCH->PCB) 2022-01-16 20:29:03 +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 1539fa5af2 Move SHAPE_ARC to EDA_ANGLE. 2022-01-16 01:19:45 +00:00
Ola Rinta-Koski da65fe0469 Font outline decomposition fixes 2022-01-15 12:51:09 +00:00
Jeff Young 862d8ce48d Default TEXT_ATTRIBUTES angles to tenths of a degree, not radians. 2022-01-15 01:30:04 +00:00
Jeff Young 3f98769a77 More EDA_ANGLE.
Includes bug fix for catastrophic error in Add() for converting to
radians.

Includes bug fixes for the fact that the pcbnew test can't seem to
find the ANGLE_* objects (getting all 0's instead).
2022-01-15 01:30:04 +00:00
Seth Hillbrand 22a77d3556 Move EDA_ANGLE to KiMath lib
KiMath should only depend on itself not on other elements in the tree
2022-01-14 17:12:24 -08:00
Jeff Young 93229c37bb Fix compile issue on Mac.
See https://kicad.zulipchat.com/#narrow/stream/216775-core-team/topic/Compile.20error
2022-01-14 20:53:25 +00:00
Jeff Young b3c324b352 Objects on UNDEFINED_LAYER should return an empty layerset.
Fixes https://gitlab.com/kicad/code/kicad/issues/10417
2022-01-14 19:49:39 +00:00
Jeff Young 07013d00e1 More EDA_ANGLE. 2022-01-14 16:08:19 +00:00
Jeff Young 1b19ff5f42 More EDA_ANGLE changes. 2022-01-14 16:08:19 +00:00
Jeff Young 037dfb6e01 Move FP_TEXT::KeepUpright() to EDA_ANGLE. 2022-01-14 16:08:19 +00:00
Jeff Young c9487bad18 Move BOARD_ITEM::Rotate() to 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
Seth Hillbrand e7d0318fb2 Plot fonts in outline mode, not triangulated
Putting 1,000s of tiny triangles on a gerber file will cause mfg fits.
Instead, we use easy outline plotting for plots and triangulation for
everything else.
2022-01-13 17:04:14 -08:00
Mark Roszko 3aff953c9c Quietly put the missing [] in the shared_ptr 2022-01-13 13:50:57 +00:00
jean-pierre charras d0f2c20235 Define our kicad font name only once, and do not translate it.
Especially using a translated name breaks kicad config and files because
in non English languages both translated and not translated names were used in code.
2022-01-13 14:32:55 +01:00
Marek Roszko 15dc1b3a38 Remove no longer used boost header 2022-01-13 07:12:13 -05:00
Marek Roszko 9965748795 Use std::shared_ptr in place of boost::shared_array
It works the same here
2022-01-13 07:10:47 -05:00
Jeff Young 6ccfec0553 Layer handling for copper sliver exclusions.
Fixes https://gitlab.com/kicad/code/kicad/issues/10147
2022-01-11 22:28:24 +00:00
Jeff Young 8f7d2dd06a More VECTOR2D -> VECTOR2I and wxPoint cleanup. 2022-01-11 14:20:14 +00:00
Ola Rinta-Koski dcab2833b8 PEGTL 2.x->3.x 2022-01-10 23:22:23 +00:00
Seth Hillbrand d5faac7614 Better fix for missing end segment
Rather than skipping our endEdit() call in libedit, we need to
parameterize whether we want the shape open/closed.  Closed will remove
the last segment if it lands on the first point.  We don't want that
but we do want to remove the last point if it duplicates the second to
last (in the case of double-clicking)

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

(cherry picked from commit 55020c2b89)
2022-01-10 13:39:39 -08:00
jean-pierre charras d42514ad30 Add code and dialog to create/add/remove teardrops, step 1 2022-01-10 20:04:40 +01:00
Jeff Young 236feeb592 Cleanup GRText APIs, 3D Viewer <-> board APIs, and Plotter APIs.
Also fixes a bug where outline fonts weren't being handled for footprint
text in 3D Viewer, and a copy/paste error in stroke font handling for
both PCB and footprint text in 3D Viewer.

Fixes https://gitlab.com/kicad/code/kicad/issues/10319
2022-01-10 14:17:11 +00:00
jean-pierre charras 72cdba44cb Fix compil issue on c++17/msys2 (and perhaps some other compilers) 2022-01-10 09:15:26 +01:00
Jeff Young 7d032f9c2f Outline font rendering for Cairo, plotter, printer and 3D viewer.
Fixes https://gitlab.com/kicad/code/kicad/issues/10319
2022-01-10 01:54:28 +00:00
Jeff Young 78cac128b7 Careful: symbol fonts have no language.
Also a bit of clean up to shut up a false-positive in Coverity (and
clangd) on dereferencing a possibly (not) nullptr.
2022-01-09 11:34:20 +00:00
Jeff Young a4349ae638 Cleanup and error reporting for fonts. 2022-01-09 11:34:20 +00:00
Seth Hillbrand f4d12fb19c Force Mesa to use its own call
Mesa does not support adaptive swapping but will sometimes report that
it does.  This prevents Mesa drivers from testing (and segfaulting) the
limits of their call

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

(cherry picked from commit 100cf757fe)
2022-01-08 17:13:52 -08:00
Marek Roszko 5621e49b21 vcpkg locates ft2build.h in the root of /include and not the freetype2 subfolder 2022-01-08 12:35:40 -05:00
Jeff Young 04c76f10e9 Performance enhancements for fonts. 2022-01-08 16:47:45 +00:00
Jeff Young 438c63f587 Fix outline font boundingbox issues. 2022-01-08 16:47:45 +00:00
Jeff Young aef2a3fca4 Default font for eeschema. 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
Jeff Young a2030a5956 GUI for font selection. 2022-01-08 16:47:45 +00:00
Ola Rinta-Koski 9b406c1da4 Outline font support. 2022-01-08 16:47:45 +00:00
jean-pierre charras 9c29cc945c prepare teardrops, round 2 2022-01-08 16:56:41 +01:00
Seth Hillbrand 3a730361d3 Fix swap interval checking
Checking for the existence of the call only validated that our header
defined the value, not that the video card/driver supported the call.
We query the extensions string directly to check for support.  This
should fix both the X11 and virtualization issues (potentially other
crashes with older video cards as well)

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

(cherry picked from commit 7c9340f855)
2022-01-06 10:53:44 -08:00
Ian McInerney bd828f598c Fix compile error with UTF8 unicode wxWidgets build
Fixes https://gitlab.com/kicad/code/kicad/issues/10210
2022-01-05 19:23:30 +00:00
Marek Roszko 5d3609b20b Nix the deprecated binary/unary base class that aren't actually needed
The std::unordered_map custom function objects here don't require inheritance from the deprecated base
2022-01-04 18:58:42 -05:00
Jeff Young cbd665db7b Remove markup_parser from headers so PEGTL doesn't leak windows.h. 2022-01-04 12:20:18 +00:00
Marek Roszko 38a25fbc4d Fix windows compile error
pegtl.hpp is dumb and leaks windows.h which then causes #define conflicts
2022-01-04 00:49:29 -05:00
Jeff Young 8e4a4306c7 Go back to using inter-character spacing from the stroke font.
Fixes https://gitlab.com/kicad/code/kicad/issues/1078
2022-01-04 00:46:08 +00:00
Jeff Young e21fa31f64 Rip out rest of macHack architecture. 2022-01-03 22:09:56 +00:00
Mike Williams 404659d275 Gerbview: Fix diff mode issues with OpenGL transparency
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10121
2022-01-02 23:15:36 +00:00
jean-pierre charras c4af66f6d3 Fix compil issues on Windows+msys2
Probably some fixes also on other platforms
2022-01-02 18:32:39 +01:00
Jeff Young 89c0f8e297 Move to new font engine. 2022-01-02 14:57:03 +00:00
Jeff Young e41a4d406a Cherry-pick MARKUP_PARSER from rockola/kicad-strokefont. 2022-01-02 14:57:03 +00:00
Marek Roszko 7d671cff1e Scoop up some more wxPoints 2022-01-01 21:06:40 -05:00
Marek Roszko c91d3e3cf9 Remove some more wxPoint 2022-01-01 14:12:20 -05: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 cadc0639eb Update BASE_SCREEN to VECTOR2I 2022-01-01 11:30:33 -05:00
Marek Roszko 347e03363a Convert wxPoint/wxSize starting from EDA_RECT usages 2022-01-01 11:30:33 -05:00
Ian McInerney 1fccbdbd53 Give EDA_SHAPE a virtual destructor
EDA_SHAPE can be inherited from, so a virtual destructor is needed
to ensure the destructors are called in order.
2021-12-31 00:05:02 +00:00
Ian McInerney 0e9cfd0af2 Add missing initialization values to variables
Flagged by Coverity.
2021-12-30 23:42:06 +00:00
Marek Roszko c7447f9be6 Remove UpdateUI from preferences pdf viewer option 2021-12-30 11:36:01 -05:00
Mark Roszko 44dc602d6b Yeet wxPoint/wxSize out of PLOTTER 2021-12-29 19:02:50 +00:00
Jeff Young ccb94fd1a7 APIs for passing KIFONT::FONT pointers around.
Also some clean-up and bug fixes.
2021-12-29 17:32:19 +00:00
Jeff Young dd6cd7d184 Pull some more improvements in from rockola/kicad-strokefont.
This one is primarily about pushing TEXT_ATTRIBUTES in to the GAL
API, but it also includes adding EDA_ANGLE signatures to some trig
routines to ease integration.
2021-12-29 17:32:19 +00:00
Wayne Stambaugh cc9d074a2a Add upated UI event throttling to advanced configuration. 2021-12-28 18:17:53 -05:00
Jeff Young 86cb57f4a7 Cherry-pick TEXT_ATTRIBUTES and EDA_ANGLE from rockola/kicad-strokefont 2021-12-28 22:15:20 +00:00
Wayne Stambaugh 7b1b96c933 Fix broken tree book selection in paged dialogs.
This only affected the tree controls that only parented sub-pages.  Do
not use the dialog ctor to select the initial page.  Queuing a page
changed event to fire after the dialog is shown is the proper solution.
2021-12-28 09:43:57 -05:00
Wayne Stambaugh 14c148cb38 Expunge update UI event handler from paged dialog object.
Use the book control page changing event to update any pages prior to
them being shown.  When the validation fails when changing pages, the
page change is vetoed until the invalid condition is fixed by the user.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/5049

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10139
2021-12-27 18:40:12 -05: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 19c3481148 Fix test failure. 2021-12-25 15:34:50 +00:00
Jeff Young acfce8d4db Fix test failures. 2021-12-24 21:33:12 +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 dabc75bee8 Source 3D dimensions from board stackup.
Also includes a performance improvemnt by caching the 3D model matrices.
2021-12-24 21:10:28 +00:00
Jeff Young 29c942816e Reduce duplication of settings. 2021-12-24 21:10:28 +00:00
Jeff Young b4c5e64db2 Exclusions for Unconnected Items; Markers & exclusions for Parity checks
Fixes https://gitlab.com/kicad/code/kicad/issues/5589

Fixes https://gitlab.com/kicad/code/kicad/issues/5504
2021-12-24 21:10:28 +00:00
Jeff Young c3552a940a Make sure standard OK/Cancel buttons respond to current language.
Fixes https://gitlab.com/kicad/code/kicad/issues/9635
2021-12-24 18:13:11 +00:00
Jeff Young 6cec58cf75 Add field access to custom DRC rules.
ADDED getField() method to custom DRC rules.
2021-12-24 18:13:00 +00:00
Jeff Young c6d4a9f0b2 Button bar for PCBNew Text Properties dialog. 2021-12-24 17:39:00 +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 af13533b42 Add show/hide controls for ERC markers.
ADDED show/hide controls for ERC warnings, ERC errors and ERC exclusions.

Fixes https://gitlab.com/kicad/code/kicad/issues/7270
2021-12-24 17:38:50 +00:00
Jeff Young a6dd1bf09b Implement Reset to Defaults for all preferences panels. 2021-12-24 17:38:39 +00:00
Jeff Young 6c05e5d1a8 Implement user viewports.
ADDED popup to Appearances palette where users can define viewports
for later selection.

Fixes https://gitlab.com/kicad/code/kicad/issues/2271
2021-12-24 17:11:14 +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 9de62d1dd4 Promote to cell selection for spreadsheet-style paste.
Fixes https://gitlab.com/kicad/code/kicad/issues/9211
2021-12-24 16:29:23 +00:00
Jeff Young 889970a449 SCH_NETCLASS_FLAGs and SCH_FIELDs for labels.
ADDED: a new label type for netclass flags.
ADDED: the ability to define fields on labels.
2021-12-24 16:13:27 +00:00
Jeff Young 9ee28ea8f5 Flatten out some more preferences. 2021-12-24 15:43:20 +00:00
Jeff Young 024097dfef Another stab at fixing the test. 2021-12-24 15:42:22 +00:00
Jeff Young 5f37c2b247 Custom rule severities.
ADDED severity token to custom rule syntax.  Each rule can now define
its own severity.

Fixes https://gitlab.com/kicad/code/kicad/issues/6148
2021-12-24 15:42:22 +00:00
Wayne Stambaugh 4789440fe1 Fix Linux build issue. 2021-12-24 08:51:51 -05:00
Jeff Young d28714167c All the preferences, all the time.
Fixes https://gitlab.com/kicad/code/kicad/issues/7877

Fixes https://gitlab.com/kicad/code/kicad/issues/5153
2021-12-24 13:08:44 +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 4b6f2f0658 Add mechanical copper clearance testing for shapes.
Also includes going from distance-based neighbor exclusion to angle-
based.  (Distance doesn't work when very short segments are followed
by very long ones.)

Fixes https://gitlab.com/kicad/code/kicad/issues/2512
2021-12-24 11:40:10 +00:00
Jeff Young 66a6a6d448 Attempt to fix test case, and improve debugging output. 2021-12-24 11:38:09 +00:00
Jeff Young a48867ea01 Solder mask integrity testing.
ADDED DRC test for solder mask aperture bridging copper from different
nets.
ADDED visualization of minimum web width processing for solder masks.
ADDED allow_soldermask_bridges property for footprints.

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

Fixes https://gitlab.com/kicad/code/kicad/issues/1792
2021-12-23 22:31:14 +00:00
Jeff Young 533276e6b6 Copper sliver checking.
ADDED DRCE_COPPER_SLIVER DRC error.
ADDED ADVANCED_CFG DRCSliverWidthTolerance and DRCSliverAngleTolerance.

Fixes https://gitlab.com/kicad/code/kicad/issues/2183
2021-12-23 22:31:05 +00:00
Jeff Young a1e3f2b188 Starved thermals DRC checking.
ADDED min_resolved_spokes constraint.
ADDED "Thermal relief connection to zone incomplete" violation.

Fixes https://gitlab.com/kicad/code/kicad/issues/2183
2021-12-23 22:30:42 +00:00
Jeff Young 295a6408c3 User-configureable dash styles (and dash-dot-dot).
ADDED: Schematic Setup properties for dash length and gap length.
ADDED: dash-dot-dot line style

Fixes https://gitlab.com/kicad/code/kicad/issues/2206
2021-12-23 20:36:24 +00:00
Jeff Young e26341d424 Cleanup. 2021-12-23 20:36:18 +00: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 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 2001d08186 Add DRC tests for text height and text thickness.
Fixes https://gitlab.com/kicad/code/kicad/issues/8683
2021-12-23 19:18:45 +00:00
Jeff Young 6e2460ad37 Add hot-updating of units in common wxGrids.
Fixes https://gitlab.com/kicad/code/kicad/issues/10020
2021-12-23 16:54:03 +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
Mike Williams 956ac871c3 PCB Editor: changes to track width overrides starting track width
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/8797
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/8797
2021-12-15 23:32:48 +00:00
Seth Hillbrand 232b39a321 Add legacy CTOR for PROF_COUNTER 2021-12-15 12:52:08 -08:00
Jeff Young 724182abe4 Fix lib tree searches to handle searching on library names.
Fixes https://gitlab.com/kicad/code/kicad/issues/9981
2021-12-14 15:18:48 +00:00
Seth Hillbrand 78ff9a857a Jerry-rig HTML-format alpha parsing
On wx3.0, the HTML format #RRGGBBAA cannot handle the alpha channel.
Instead, we route this through a COLOR4D routine when we need to use
these colors

Fixes https://gitlab.com/kicad/code/kicad/issues/9963
2021-12-13 16:04:40 -08:00
dsa-t 4ccfc21324 Fix event id intersections when toggling some columns via popup.
Also increases maximum show/hide column count to 50.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9765
2021-12-13 00:35:44 +03:00
Jon Evans 3cb7ca1db4 Remove manual canvas scale from GTK
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9912
2021-12-09 18:36:44 -05:00
Seth Hillbrand 9884f40952 Update call signature for SwitchLayer
We don't use DC anymore
2021-12-09 10:14:11 -08:00
Jeff Young 1f9e75f676 Pad with hole same size or larger than pad isn't flashed.
... even if it's marked as being on copper layers.

Also changes the default hole clearance to 0.25mm.

Fixes https://gitlab.com/kicad/code/kicad/issues/9901
2021-12-08 23:16:33 +00:00
Jeff Young 7ffd43a6f4 Regularize the promotion of pads to footprints in non-free-pad mode.
Also regularizes some of the other selection filtering options.

This also fixes an invalidated iterator (and subsequent segfault) in
the old code.

Fixes https://gitlab.com/kicad/code/kicad/issues/9896
2021-12-08 13:08:54 +00:00
dsa-t 51eac3ba04 Improve EDIT_LINE position calculations beyond INT_MIN/2 ~ INT_MAX/2 2021-12-07 21:24:09 +00:00
Jeff Young 2e342ed8c9 Draw dangling symbols on a separate layer.
This allows us to draw them in front of wires, pins, and most
importantly, junction dots.

Fixes https://gitlab.com/kicad/code/kicad/issues/9667
2021-12-06 18:50:50 +00:00
Mikolaj Wielgus b9e66d8b98 Update EDA_ITEM::HitTest docstring
HitTest() doesn't check for containment or intersection with the
bounding box, but with the selection-active region.
2021-12-06 01:16:17 +01:00
Jon Evans 014bad7b28 Add profile counters for PCB mouse and paint events 2021-12-05 15:16:08 -05:00
Jon Evans a205595404 PROF_COUNTER -> PROF_TIMER
I want to add an event counter, and this one is a timer
2021-12-05 14:25:37 -05:00