Jon Evans
1d9ca181a2
PNS: Use existing seg direction if both DP segs are parallel
2021-04-12 22:34:13 -04:00
Jon Evans
37dd4038eb
Display options can change during the picker lifecycle
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7133
2021-04-12 22:12:48 -04:00
Jon Evans
36ef198610
Clean up nets from items when deleting in the inspector
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8162
2021-04-12 21:17:42 -04:00
Jon Evans
311cde0984
Safety check suggested by Coverity
2021-04-12 20:42:50 -04:00
Jon Evans
2aa5e568e8
Refactoring
2021-04-12 20:40:05 -04:00
Jon Evans
73fb85a352
PNS: Calculate diff pair primitive orientation using anchors only
...
The previous method fails if the primitive is an expanding or
contracting pair (diagonals going inward or outward) resulting in
incorrect orientation, which then leads to incorrect candidate
gateways being generated and no solution found.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8185
2021-04-12 20:34:44 -04:00
Jon Evans
94fad2944d
ConvertOutlineToPolygon: Don't crash if we didn't find a segment owner
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8184
2021-04-12 19:59:55 -04:00
Jon Evans
715c61ac9f
PNS: Fix yet more arc edge cases
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8150
2021-04-12 19:59:55 -04:00
Roberto Fernandez Bautista
edb2136a0d
CADSTAR PCB: KiCad's minimum permitted Through Drill is 0.0508mm(2mils)
2021-04-12 20:25:05 +01:00
Roberto Fernandez Bautista
a3196a11a7
CADSTAR PCB: Be more specific with "allow thermal pads" DRC hack
...
Only tag the footprint as such when we know it has overlaping copper
over the pads with different pad numbers
2021-04-12 20:25:05 +01:00
Roberto Fernandez Bautista
b5edd5f6a5
CADSTAR PCB: Fix loading of thermal pads
...
- Create a pad if a component copper is associated with any other pads
in the footprint.
- Rename/renumber 'PCB Only' pads that are associated with a component
copper and make them all use the same pad name/number.
2021-04-12 20:25:05 +01:00
Roberto Fernandez Bautista
2eb96279a2
Fix FOOTPRINT copy constructor so it maintains ordering of containers
2021-04-12 20:25:04 +01:00
Jeff Young
a4c08e2af6
Apply Eeschema cursor updating architecture to PCBNew.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8135
2021-04-12 11:11:11 +01:00
Jeff Young
2cba64b258
Fix missing env var expansion in pos file generation.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8178
2021-04-12 10:17:42 +01:00
Jeff Young
34ea6891b0
Formatting.
2021-04-12 10:17:42 +01:00
jean-pierre charras
675ec70f0f
PANEL_SETUP_BOARD_STACKUP: fix a wxassert due to a "C" locale test in a format function.
...
A call to FormatInternalUnits() was made without switching to "C" locale.
In this case it was not necessary, but FormatInternalUnits() expects in some tests
this locale, thus creating issues (assert and incorrect conversion)
Fixes #8177
https://gitlab.com/kicad/code/kicad/issues/8177
2021-04-12 09:57:40 +02:00
Jon Evans
49a91414d7
PNS: Apply co-linear seg merging to drag operations
2021-04-11 22:32:11 -04:00
Jon Evans
1c431d9929
PNS: Fix some off-by-one errors with arc dragging
2021-04-11 22:12:53 -04:00
Jon Evans
a26fc6d65d
PNS: Fix several issues with arc dragging
...
Do not merge vertices that belong to different arcs
Fix start segment identification after arcs
Fix free-angle drag after arc
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8173
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8150
2021-04-11 17:56:40 -04: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
2cde76a191
Don't do any hole clearance testing within a single footprint.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8141
2021-04-11 16:03:16 +01:00
Jon Evans
7ba110bd77
PNS: Fix dragging of segments with arcs in line
2021-04-11 10:18:57 -04:00
Thomas Pointhuber
a30894e5a1
Allow SHAPE_LINE_CHAIN and SHAPE_ARC to be mirrored using a SEG
2021-04-11 13:27:25 +00:00
Thomas Pointhuber
fe8fbf1d5d
Use arcs instead of line approximation for Miter shape
...
TODO:
* The resulting line chain is broken with the arcs, and
this appears to be some subsequent issue I was not able to pin down.
* The requirement of a correction factor is not clear to me
2021-04-11 13:27:25 +00:00
Jeff Young
cc956695ae
Hit test for worksheet before adding Properties to menu.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8171
2021-04-11 14:18:35 +01:00
Jeff Young
6072f5831b
Apply uniform spacing to orientation controls.
2021-04-11 10:33:26 +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
Jon Evans
5c448057c8
PNS: Prevent state flicker when starting drag
2021-04-10 16:31:39 -04:00
Jon Evans
7784d7cb12
PNS: Fix visible area restriction
...
VIEW::GetBoundary() returns the entire view area, not the visible area.
Surprisingly, we had no API for this, so I added one.
Also, changed the dragger behavior to toggle between optimizing just the
modified area and optimizing the visible area, i.e. we will now never
optimize off-screen portions of the dragged track.
2021-04-10 16:13:08 -04:00
Jon Evans
94afdcb92a
PNS: Allow control of area-restricted drag optimization
...
CHANGED: The interactive router settings now include a switch to
enable or disable optimization of the entire dragged track,
which is now disabled by default. When enabled, the router
will reroute the entire track (from the dragged segment to
the closest pad/via in each direction) to be more optimal.
When disabled, only the area around the dragged segment
will be modified.
CHANGED: The "optimizer effort" slider is removed from the interactive
router settings dialog, as this setting did not have any
meaningful impact in most cases and was a source of confusion.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5918
2021-04-10 15:17:39 -04:00
Jonathan Haas
846e4aed42
Fix selection filter in Edit Text and Graphics dialog
...
Fixes https://gitlab.com/kicad/code/kicad/issues/7966
Fixes https://gitlab.com/kicad/code/kicad/issues/8149
2021-04-10 15:49:23 +00:00
Jeff Young
dc0cf3b802
Clean up a confusing API.
...
AllowDRCViolations is kept in any mode as a *setting*, but only
controls router behaviour when the mode is mark obstacles.
Fixes https://gitlab.com/kicad/code/kicad/issues/7795
2021-04-10 11:08:02 +01:00
Jeff Young
176fcd43d8
Cleanup.
2021-04-10 10:04:02 +01:00
Jeff Young
252fad1cc7
These grids *must* have a border on OSX to render correctly.
2021-04-10 10:04:02 +01:00
Jeff Young
f606069bf6
Formatting.
2021-04-10 10:04:02 +01:00
Mikolaj Wielgus
43d8145304
Pcbnew: Snap to the closest point on graphic polygon border
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8164
2021-04-09 22:33:55 +00:00
Jonathan Haas
58dfb6539f
Change orientation and flip sign of dimension height when rotating orthogonal dimensions.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/6940
2021-04-09 22:30:18 +00:00
Jeff Young
d2c7df155b
Don't show blind/microvia holes on layers they don't appear on.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8144
2021-04-09 17:14:53 +01:00
Jeff Young
3450610977
Add ability to allow thermal vias to be implemented as pads.
...
This is mostly just for CADSTAR. Since we don't (yet) have general
purpose footprint attributes, this reuses the "net tie" hack.
Fixes https://gitlab.com/kicad/code/kicad/issues/8141
2021-04-09 14:02:13 +01:00
Jon Evans
619a353c5e
Decouple 3D view dirty marking and refresh
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8154
2021-04-08 22:09:19 -04:00
Seth Hillbrand
7b3c7e1ef3
Fix some free/delete issues
...
Removes the C-format memory management
2021-04-08 16:58:45 -07:00
Ian McInerney
9939af3e27
Fix color handling in the stackup manager panel
...
Fixes https://gitlab.com/kicad/code/kicad/issues/5671
2021-04-09 00:56:31 +01:00
Ian McInerney
401bc53038
Move the DRC constraints page into a scrolled window
...
We seem to be getting a lot of these now, and it was
being cutoff by default - so make it a scrolled window
like the severities.
2021-04-09 00:56:31 +01:00
Ian McInerney
5490a85f97
Don't recompute the board thickness on UI update
...
The thickness only needs to be computed when the actual
values change, so computing on UI update is a waste of
resources and can cause UI lag.
Fixes https://gitlab.com/kicad/code/kicad/issues/5049
2021-04-09 00:56:31 +01:00
Mikolaj Wielgus
d64de3808f
Pcbnew: Snap to group items
...
Fixes https://gitlab.com/kicad/code/kicad/issues/7694
2021-04-08 23:22:19 +00: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
5ea68c7694
Copy some bug fixes from DRC dialog across to Footprint Checker.
2021-04-08 22:37:14 +01:00
Jon Evans
4521091cc1
Do not invalidate geometry when all we need is a repaint
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8157
2021-04-08 17:35:51 -04:00
Jon Evans
d878cbddbc
PNS: a few forgotten cleanup items
2021-04-07 23:34:45 -04:00
Jon Evans
c9040a5c53
PNS: fix some weirdness identified by PVS
2021-04-07 23:16:56 -04:00
Jon Evans
e0f26fd525
Make live 3D refresh optional
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8068
2021-04-07 22:39:30 -04:00
Jon Evans
d4957b112e
PNS: Keep last valid drag solution in the node
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5450
2021-04-07 21:59:23 -04:00
Jon Evans
26835f582c
Some situations require more than one dummy
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7820
2021-04-07 21:30:18 -04:00
Jon Evans
9432484394
PNS: Find origin segment correctly when arcs are present
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8139
2021-04-07 20:28:30 -04:00
Ian McInerney
18f07024a6
Simplify UI event handling in pcbnew global edit dialogs
...
Instead of enabling/disabling the controls on every possible
UI event in these dialogs, only do it when the actual control
wants to know if it should change status.
2021-04-07 17:39:48 +01:00
Ian McInerney
1a727558b0
Switch update event handlers to use the event instead of pointers
...
It is safer to use the event to pass the enable/string
instead of pointers, since using the pointers could trigger
other UI events.
2021-04-07 17:39:48 +01:00
Ian McInerney
29cc16a4c4
Push pcbnew layer alpha change update into base frame
...
This code was shared between the footprint frame and
pcb edit frame, so push it into the base edit frame.
Also remove the dummy wxUpdateUIEvents that weren't
actually being used.
2021-04-07 17:39:48 +01:00
Jeff Young
3fd3be9843
Layer fixes for PCBNew drawing tools.
...
1) Implement layer changes for dimension drawing tool
2) Ensure drawing layer is visible for (1) and for the text drawing
tool.
Fixes https://gitlab.com/kicad/code/kicad/issues/8106
2021-04-07 15:02:48 +01:00
Jeff Young
e50b450092
Formatting and organisation.
2021-04-07 14:50:29 +01:00
Roberto Fernandez Bautista
85efdb85b0
CADSTAR PCB: Ensure continuous track routes
...
When route offsetting, add an additional thin track to ensure
end point of one track and start point of the next are at the same
location.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8131
2021-04-07 11:28:02 +00:00
Roberto Fernandez Bautista
211fd65c23
Move: Ignore mouse up and click events until a mouse move / drag event
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8123
2021-04-06 17:29:52 +00:00
Jeff Young
09b2db3139
Test for group in footprint was snagging all footprint children.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8121
2021-04-06 18:27:43 +01:00
Jon Evans
9f957d3e08
Fix crash when attempting to tune discontinuous lines
...
Also correctly find the tuning path through arcs
https://gitlab.com/kicad/code/kicad/-/issues/8131
2021-04-06 09:07:11 -04:00
Roberto Fernandez Bautista
235688e459
Less restrictive Arc Track Dragging tool
...
Use the connecting straight tracks even if not exactly parallel - allow
an error margin configurable in ADVANCED_CFG (default 1 degree). Also
be less strict about end point matching and use the width of the track
as the criteria to determine suitability.
Finally, delete any short lengths of track at the end of the operation
and amend the arc end points to keep connectivity.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7967
2021-04-06 12:52:01 +00:00
Roberto Fernandez Bautista
0a2c8575ce
ZONE properties: stage commit even if !Settings().m_AutoRefillZones
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8028
2021-04-06 12:52:01 +00:00
Jeff Young
69fd0b38ff
Remove a couple of unused OnUpdateUI handlers.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/5049
2021-04-06 13:47:15 +01:00
Jeff Young
daaf738c7f
Add save-as files to file history.
...
Also fixes where lock wasn't getting reset on a Save As.
Fixes https://gitlab.com/kicad/code/kicad/issues/8111
2021-04-06 13:35:26 +01:00
david-beinder
b2f788adc1
PNS: Fix UseConnectedTrackWidth when starting from ARCs
2021-04-06 01:27:13 +00:00
Jon Evans
e46c9d35ac
Add undo/redo handling to length tuner event loop
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8129
2021-04-05 19:58:14 -04:00
Jon Evans
24cd174a23
Don't dereference a possibly-invalid optional
2021-04-05 19:34:57 -04:00
Jeff Young
ec45855aed
Make sure drawing layer is visible.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8106
2021-04-06 00:06:23 +01:00
Roberto Fernandez Bautista
9a764126ce
CADSTAR PCB: Keep all tracks as a single chain where possible
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8119
2021-04-05 20:15:09 +01:00
Jon Evans
a6c3d74a73
Pass active layer to StartRouting in length tuner
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7857
2021-04-04 21:51:54 -04:00
Jon Evans
a24bc34b66
Better colors for length tuning popup in dark mode
2021-04-04 20:33:59 -04:00
Jon Evans
c7ecb51f77
Update PNS length tuning algorithm to match the new BOARD algorithm
...
Now tracks inside pads are optimized to give a more accurate length.
Also, the start/end of the assembled line is used to identify the right
pad joints for pad-to-die length calculation.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4204
Fixes https://gitlab.com/kicad/code/kicad/-/issues/1765
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6877
2021-04-04 20:27:22 -04:00
Jon Evans
41c54d383e
Fix some edge cases with length calculation
2021-04-04 19:38:54 -04:00
Jon Evans
cdfb014ab6
CHANGED: Account for via height in track length calculations
2021-04-04 13:59:18 -04:00
Jon Evans
80728f8d78
Improve algorithm for calculating net length; use it for netinfo message panel
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4258
2021-04-04 12:27:09 -04:00
Jon Evans
6b24abac8f
PNS: Don't snap to end items if snapping is disabled by modifier key
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8033
2021-04-04 10:22:23 -04:00
Jeff Young
52ca7ed27c
Naming conventions.
2021-04-04 10:43:56 +01:00
Jeff Young
c1df77f59b
Terminology.
2021-04-04 10:32:24 +01:00
Jeff Young
98e6a089ab
Treat board edges same as graphics for locked/unlocked.
...
It would appear that not using the locked/unlocked graphics filters
is confusing too (see deleted comments in code).
Fixes https://gitlab.com/kicad/code/kicad/issues/8114
2021-04-04 10:27:26 +01:00
Jeff Young
2c3ee0d85f
Don't forget CommitPendingChanges.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8083
2021-04-04 01:02:31 +01:00
Ian McInerney
83ae28f04f
Fix selection when pasting/duplicating items
...
The item flags weren't getting reset after placing
the new items, so the next operation on them was
having weird behavior.
Fixes https://gitlab.com/kicad/code/kicad/issues/7528
2021-04-03 19:09:21 +01:00
Carsten Schoenert
cb17c9f3dd
Typo fix: Correct various misspelled words
...
agressive -> aggressive
decription -> description
miscellanous-> miscellaneous
rectange -> rectangle
Unkown -> Unknown
2021-04-03 13:39:50 +00:00
Carsten Schoenert
8dff3725ac
Typo fix: Correct 'allow to' -> 'allows one to'
2021-04-03 13:39:50 +00:00
Jeff Young
52aea0a2c9
Consistent terminology.
2021-04-03 11:15:11 +01:00
Jeff Young
c5536b2cab
Title case in menus.
2021-04-03 11:15:11 +01:00
Mikolaj Wielgus
aa09d6448a
Pcbnew: Allow Create Array on groups
...
Also removes possible null pointer dereferencing.
Fixes https://gitlab.com/kicad/code/kicad/issues/7515
2021-04-03 09:06:49 +00:00
Jon Evans
a8896ebd73
Don't show leading ratline for unconnected net
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8040
2021-04-02 20:29:25 -04:00
Mikolaj Wielgus
d7a95e2af4
Rotate FP_TEST properly when flipping
...
The angle was `-angle` instead of `180 deg - angle` when flipping top to
bottom.
Fixing that, in turn, created some problems with justification, which
was modified both by `FP_TEXT::Flip()` and `FP_TEXT::KeepUpright()`.
What's worse, `FP_TEXT` has another mechanism for keeping the text
upright: `FP_TEXT::GetDrawRotation()` returns different angles if the
"keep upright" flag is set. But there is no analogous behavior for
justification, so the text would sometimes get shifted, and sometimes
not, depending on which mechanism was engaged. And both are used,
apparently.
Clearly, such an arrangement an open invitation to bugs and
inconsistencies. One of these mechanisms should be removed. I haven't
done this yet, and would prefer to postpone this until V6 is out.
I've fixed the justification problems, but this was by trial-and-error,
and I don't feel I really understand the behavior responsible. But I
think it's a good sign that most of my changes are line removals, not
additions. Flipping is a simple operation, it's just mirroring and layer
change. If something simple has a complicated routine, then it's
probably full of hacks.
Fixes https://gitlab.com/kicad/code/kicad/issues/7289
2021-04-02 21:13:21 +00:00
Mikolaj Wielgus
0a660c2364
Pcbnew: Remove 180 deg rotation when flipping PCB_TEXT in some cases
2021-04-02 21:13:21 +00:00
Mikolaj Wielgus
99fd872fce
Pcbnew: Do not move footprint fields twice in align/distribution tools
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8094
2021-04-02 21:09:36 +00:00
Mikolaj Wielgus
7655533412
Do not move footprint fields twice when performing Move Exactly
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8062
2021-04-02 21:07:59 +00:00
Ian McInerney
1931677316
Ensure the layer dropdowns are correctly sized
...
On GTK, the layer dropdown was sized based on an empty list,
so for non-default fonts it would be undersized and cutoff
the font.
2021-04-02 21:33:31 +01:00
Ian McInerney
1db5e2bc96
Don't force an entire refresh of toolbars to update sizes
...
Forcing an entire refresh of the toolbars is wasteful,
so instead just update the sizers directly.
2021-04-02 19:12:21 +01:00
jean-pierre charras
d3bf20e80b
Pcbnew, place free via: take netcode from the pad, if the via is inside a pad.
...
Fixes #8089
https://gitlab.com/kicad/code/kicad/issues/8089
2021-04-02 17:19:44 +02:00
Jeff Young
f88d39b4f0
Fix state issue in router's switch layer handling.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/7590
2021-04-01 18:10:04 +01:00
Jeff Young
f6f31b7654
Get rid of save warning after Footprint Editor Save As.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8084
2021-04-01 11:17:24 +01:00