Commit Graph

2508 Commits

Author SHA1 Message Date
luz paz af6ba1a16e Fix typos in pcbnew sub-directory
Found via `codespell -q 3 -S *.po,./thirdparty,./Documentation/changelogs -L aactual,acount,aline,alocation,alog,anormal,anumber,aother,apoints,aparent,aray,ba,busses,dout,einstance,leaded,modul,ontext,ot,overide,serie,te,,tesselate,tesselator,tht`
2022-06-30 09:39:45 -04:00
Mike Williams 64b89639cf PCB Editor: Make Ctrl-Click net highlighting configurable
Defaults to ctrl-click is exclusive or selection like other
applications. Footprint editor can only be exclusive or.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10810
2022-06-28 16:29:14 +00:00
Jeff Young ab9c42d427 Fix a typo which leads to a bogus type-cast.
Fixes https://gitlab.com/kicad/code/kicad/issues/11886
2022-06-27 23:07:06 -06:00
Jeff Young 23e8bafd9c Don't run courtyard conflicts in footprint editor. 2022-06-20 22:25:39 +01:00
Jeff Young 298edb09c3 Initialize TEXT_ATTRIBUTES justifications for text & textboxes.
Fixes https://gitlab.com/kicad/code/kicad/issues/11805
2022-06-20 17:03:37 +01:00
Jeff Young 73836b50fc Add proper collision test to via placer.
Also moves DISALLOW constraint processing outside the loop as it
performs it's own loop over any objects referenced by the rules.

Fixes https://gitlab.com/kicad/code/kicad/issues/11832
2022-06-19 21:57:49 +01:00
Jeff Young 5da817649b Fix nullptr bug. 2022-06-18 13:04:06 +01:00
Jeff Young 97b0005780 More caching for DRC.
Also fixes a bug where some physical clearance tests would be run even
if the clearance was 0 (or if the rule was set to IGNORE).
2022-06-17 23:58:31 +01:00
Jeff Young d40664d171 Handle double-click in dimension drawing tool.
Fixes https://gitlab.com/kicad/code/kicad/issues/11815
2022-06-15 18:07:50 +01:00
Marek Roszko 87f10ea206 Split off the netlist export content helper but it's advancedcfg 2022-06-11 23:09:47 -04:00
Jeff Young 9b70308f5c Nullptr defensive code.
Fixes https://gitlab.com/kicad/code/kicad/issues/11690
2022-06-11 22:32:12 +01:00
Jeff Young d31bd4ea3e Use default text properties for textboxes.
Also make sure text is mirrored when placed on back of board.

Fixes https://gitlab.com/kicad/code/kicad/issues/11739
2022-06-03 18:48:09 +01:00
Jeff Young bd51b33f65 Clear point editor before recombining pad.
Fixes https://gitlab.com/kicad/code/kicad/issues/11731
2022-06-02 15:55:35 +01:00
Jeff Young de12c63de6 Repair point editing of rotated text boxes.
Fixes https://gitlab.com/kicad/code/kicad/issues/11432
2022-06-02 10:42:57 +01:00
Jeff Young f8829de5ea Formatting. 2022-06-02 10:42:57 +01:00
Jeff Young 155620cc9a Move H/V/45 mode from zone properties to toolbar.
Fixes https://gitlab.com/kicad/code/kicad/issues/8587
2022-05-29 21:30:15 +01:00
Jeff Young 1fb7532859 Prepare for a more uniform implementation of H/V/45 mode. 2022-05-29 21:30:14 +01:00
Mike Williams 21a7e050ab REMOVED: PCB Editor Layer Alignment Target
No longer used by modern PCB processes.

Only the code to add the target to the board has been removed. Parsing
code for existing designs with targets is left in place.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10006
2022-05-26 08:47:02 -04:00
Jeff Young f7fcc310f8 Select next/prev copper layer whether we start on copper or not.
Fixes https://gitlab.com/kicad/code/kicad/issues/11600
2022-05-20 15:59:29 +01:00
jean-pierre charras a09bd4ae12 Fix a bug in commit 57e59a49 2022-05-20 15:08:50 +02:00
jean-pierre charras 57e59a4959 Pcbnew, on line DRC when moving footprints: add visible collisions between courtyards 2022-05-20 12:58:05 +02:00
Jeff Young 23fb4c7433 Uniformly use a single facility for location-less prime events.
Also implements a uniform mechanism for avoiding auto-scroll after
a prime event or dialog which results in a mouse position at the
edge of the canvas.

Fixes https://gitlab.com/kicad/code/kicad/issues/11057
2022-05-16 23:43:00 +01:00
Jeff Young f2fc78f380 Don't copy modifiers to prime events.
The modifiers go with the hotkey, not with the action.

Fixes https://gitlab.com/kicad/code/kicad/issues/11618
2022-05-16 13:51:40 +01:00
Jeff Young 37838dffb9 Make sure physical_clearance rules are run against courtyard layers. 2022-05-10 23:02:53 +01:00
Jeff Young 30ecca464d Rename mechanical_clearance -> physical_clearance.
Fixes https://gitlab.com/kicad/code/kicad/issues/11554
2022-05-06 15:54:46 +01:00
Jeff Young 5d0d2201f3 Improve clearance report messages.
Removes some duplicated terms; puts in some more headers to make
visual parsing easier, and makes non-connected-pads report the correct
data.

Also fixes a bug where zone-connection overrides of none weren't getting
handled correctly.

Fixes https://gitlab.com/kicad/code/kicad/issues/11544
2022-05-03 16:30:04 +01:00
Jeff Young 5f10c15a87 Fix zone merge intersection algorithm.
Fixes https://gitlab.com/kicad/code/kicad/issues/11492
2022-04-29 22:17:53 +01:00
Jeff Young f5d612eaed Switch <insert> replacement on OSX to <f1>.
Fixes https://gitlab.com/kicad/code/kicad/issues/11413
2022-04-25 10:01:33 +01:00
Jeff Young 90bfe2d94b Remove Save Copy As from fp editor, and rename to Save a Copy elsewhere.
It's still used by Eeschema and PCBNew when not in stand-alone mode.

Fixes https://gitlab.com/kicad/code/kicad/issues/9185
2022-04-24 19:46:57 +01:00
Jeff Young f0dab2e07b Fix some layer handling issues. 2022-04-23 21:29:46 +01:00
Jeff Young c6f83b6dec ADDED Duplicate Footprint, Rename Symbol and Rename Footprint. 2022-04-22 22:06:51 +01:00
Mike Williams b42365190e Schematic/PCB: deleting fields sets them to invisible 2022-04-21 16:20:23 +00:00
jean-pierre charras 26370583fa French translation update and fix a typo. 2022-04-18 11:25:51 +02:00
Jeff Young 71c2cb3180 ADDED revert for pcbnew and eeschema.
Fixes https://gitlab.com/kicad/code/kicad/issues/6802
2022-04-17 20:02:58 +01:00
Jeff Young 9ff1ae5bdc Better inspection reporting for netclasses, custom rules and DRC. 2022-04-17 00:33:56 +01:00
Jeff Young 7f3a75bccd Add a bunch more inspections for rule resolution. 2022-04-15 22:10:13 +01:00
Jeff Young c78a47c3fb Remove extra test.
Fixes https://gitlab.com/kicad/code/kicad/issues/10364

Fixes https://gitlab.com/kicad/code/kicad/issues/10364
2022-04-14 17:09:27 +01:00
Jeff Young a49bb792bd Insert chevrons when placing vias near tracks.
Fixes https://gitlab.com/kicad/code/kicad/issues/10898
2022-04-11 16:26:36 +01:00
Jeff Young 29eb5931c2 Be more careful with forced cursor positions.
Fixes https://gitlab.com/kicad/code/kicad/issues/9977
2022-04-10 23:14:57 +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
Seth Hillbrand 9fcc641808 Don't set the dirty bit when running DRC
Dirty bit is set in the zone filler separately, there is no action in
the DRC that needs to be saved

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

(cherry picked from commit 821fe6ea42)
2022-04-06 17:05:19 -07:00
Jeff Young f272056f20 Fix assert. 2022-04-04 20:43:08 +01:00
Jeff Young 7f7910d922 Dirty text caches in pcb point editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/11319
2022-04-04 17:39:58 +01:00
Seth Hillbrand 737d65fd36 Skip zero-size elements when converting
Also fixes an assertion when converting to polygon from the board editor

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

(cherry picked from commit 6706a5c462)
2022-04-01 13:24:10 -07:00
Jeff Young d174af4006 Handle textboxes moving back to RECT shape (ie: cardinal rotation). 2022-04-01 16:12:23 +01:00
Jeff Young a35ae8cdce Don't re-fetch selection when running select-in-same-sheet.
Fixes https://gitlab.com/kicad/code/kicad/issues/11110
2022-03-28 21:54:24 +01: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 343b2681d4 Midpoints for eeschema rectangles and text boxes.
Fixes https://gitlab.com/kicad/code/kicad/issues/10362
2022-03-28 11:16:39 +01:00
Wayne Stambaugh 7da7864f5e Fix some Coverity issues. 2022-03-25 15:51:05 -04:00
Wayne Stambaugh 7b2d9dfc0c Fix some Coverity uninitialized scalar variable issues. 2022-03-24 13:17:07 -04:00
Jeff Young cf611f1742 Better safety around layersets. 2022-03-21 18:19:00 +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
Jeff Young fa5a484797 Remove unused variable. 2022-03-16 14:56:32 +00:00
Jeff Young 06c1bccccd Exclude hidden text from selection in FP Editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/11111
2022-03-12 23:29:01 +00:00
Fabien Corona d452f79860 pcbnew: search for nets
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10601
2022-03-10 23:12:30 +00:00
Seth Hillbrand b5c2f0d39a Remove the open array in favor of std containers
The containers allow iteration, size knowledge and lower bug surface
2022-03-03 16:03:26 -08:00
Jeff Young ec5b7a57ec Consistency in via dimensions terminology.
Fixes https://gitlab.com/kicad/code/kicad/issues/11024
2022-03-03 22:40:18 +00:00
Seth Hillbrand 2fafa55647 Maintain width of converted tracks 2022-03-02 10:45:53 -08:00
Seth Hillbrand 7e836ae27a Select the copper layer before processing
If we are converting to tracks, the copper layer needs to be selected
before any other elements are processed, otherwise, we end up with the
default undefined layer

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

(cherry picked from commit 9396735733)
2022-03-02 10:41:44 -08:00
Jeff Young 1966972fc1 Retire no-pads warning in favour of defaulting to area-based remove islands strategy. 2022-03-01 19:19:18 +00:00
Jeff Young 843a56c4e4 Implement two-staged zone priority: assigned priority followed by UUID. 2022-03-01 14:53:35 +00:00
Jeff Young a4a3f6ff74 Fix zone/connectivity deadlock. 2022-03-01 12:02:17 +00:00
Seth Hillbrand fab78af176 Remove TEDIT
This marker is not used in KiCad and creates merge conflicts when two
different users edit the same file
2022-03-01 00:25:44 +00:00
Jeff Young 58b8d63ff8 Draw boundary based on first zone layer. 2022-02-28 21:40:36 +00:00
Jeff Young d299ddbc7e Cleanup. 2022-02-27 12:05:39 +00:00
Jeff Young ae85f57577 Drop a knee between tracks to a single item when dragging.
This prevents the disambiguation menu from coming up when we don't
really care which element we start the drag on.

Fixes https://gitlab.com/kicad/code/kicad/issues/10745
2022-02-26 22:54:23 +00:00
Jeff Young 89c14f01f7 Repair algorithm to avoid slow movement issue.
This goes back to the previous code for this one part.

Fixes https://gitlab.com/kicad/code/kicad/issues/10976
2022-02-26 15:58:44 +00:00
Seth Hillbrand 535ea800c0 Honor modifier keys in diambiguation
Needs to be reset for the new action before selecting elements at a
point.

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

(cherry picked from commit a30ad0b54a)
2022-02-25 16:16:15 -08:00
Seth Hillbrand 283aaff2df Use board polygon instead of bbox for size
Board BBox uses the visible size of the board, which includes edge cut
thickness.  This is not appropriate for the Board characteristics.
Using the outline polygon gives accurate results and falls back to a
bounding box in the case where the outline is invalid

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

(cherry picked from commit 54f621c570)
2022-02-25 11:14:54 -08:00
jean-pierre charras a7b8a1446b fix minor compil warnings. 2022-02-25 14:26:37 +01:00
Jeff Young bc51c89c90 Reconcile zone-auto-fill with undo. 2022-02-25 13:05:49 +00:00
Jeff Young 5c54f40eae Layer visibilities aren't stored in project for footprint editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/10953
2022-02-25 00:08:49 +00:00
Jeff Young d65f9ad2d8 Implement multi-layer stitching via logic. 2022-02-24 21:32:43 +00:00
Jeff Young 369f53bb19 Better DRC checking when placing vias. 2022-02-24 21:32:43 +00:00
Jeff Young b7be42375d Add an infobar warning when trying to fill a zone which is not connected. 2022-02-24 21:32:43 +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 f076d07e9e Fix asserts. 2022-02-24 18:16:45 +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
Jeff Young df3291c59d Fix nullptr error (no router tool in footprint editor). 2022-02-20 16:56:53 +00:00
Jeff Young f18aae679c Use router to update message panel when routing.
Fixes https://gitlab.com/kicad/code/kicad/issues/10068
2022-02-20 16:50:30 +00:00
Jeff Young 85805b95ba Cancel or commit pad edit mode when switching footprints.
Fixes https://gitlab.com/kicad/code/kicad/issues/10209
2022-02-19 19:36:19 +00:00
Jeff Young 5efa354f0f Add asserts to flush out incorrect uses of GetLayer(). 2022-02-18 12:14:38 +00:00
Jeff Young 662fb40605 Slightly cleaner impl. 2022-02-17 12:48:29 +00:00
jean-pierre charras 5a9fb08778 zone_filler_tool: fix crash due to a null pointer use in zone filler.
Fixes #10875
https://gitlab.com/kicad/code/kicad/issues/10875
2022-02-17 09:21:14 +01:00
Jeff Young b1bd8421e0 Performance: remove associated triangle sets when removing outline.
This saves us having to re-triangulate at the end of zone filling.
2022-02-16 17:00:54 +00:00
Jeff Young 5c9e718407 Performance enhancements for connectivity.
1) Generate SHAPE_POLY_SET triangulation by outline so they can be
shared between connectivity system and other clients.
2) Don't add items to connectivity when reading board; we're going
to do a total rebuild anyway.
3) Use multithreading when caching triangulation.
2022-02-15 12:20:34 +00:00
Jeff Young 98b9c6e2a1 Better progress reporting and a slight performance boost on commit. 2022-02-15 12:20:34 +00:00
Jeff Young d2de114d21 More performance optimizations. 2022-02-15 12:20:34 +00:00
jean-pierre charras 876061369b Fix some Pcbnew crashes due to null pointers 2022-02-14 13:46:05 +01:00
Jeff Young a2ca8cf413 Improve SNR. 2022-02-12 18:38:11 +00:00
Jeff Young 00934fdd84 Move GUI queries in PLUGIN to a callback.
Also makes sure legacy zone fills get deleted and re-filled (since
just dropping the outline will change them).
2022-02-11 22:09:22 +00: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 50a4d610a6 Be cognizant of flashed layers when generating pad shapes. 2022-02-11 13:10:52 +00:00
Seth Hillbrand 51d7b49067 Don't halt expansion on zero-length
We avoid counting endpoints for tracks that have no length
2022-02-07 13:53:42 -08:00
Seth Hillbrand 162545ddf0 Validate arc output when editing
Handles checking output of the arc to ensure we don't end up generating
an invalid arc.  Also keeps the limit of the arc angle to be (360,360)
excluding 0.

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

(cherry picked from commit 8fc831cbc2)
2022-02-07 08:55:53 -08:00
jean-pierre charras 2485648a54 Fix typo in a copy/paste and a minor compil warning 2022-02-07 17:32:19 +01:00
Jeff Young 34a9a165c9 More wide-string declarations. 2022-02-05 22:26:31 +00:00
Marek Roszko a7ebfc31f9 Fix some leaking objects identified by PVS Studio V773 2022-02-05 11:16:11 -05:00
Jeff Young 4cc1ced2f3 Log an undo item when filling zones.
If we wanted to put it into the parent's undo item, then the *parent*
would need to not start a new undo record.  Not starting one in the
zone filler tries to add it to the *previous* change, not to the parent
change.

Fixes https://gitlab.com/kicad/code/kicad/issues/10091
2022-02-04 13:45:32 +00:00
Jeff Young 8d3e1639d0 Update text variables when they change.
Fixes https://gitlab.com/kicad/code/kicad/issues/10734
2022-02-04 12:52:46 +00:00