Commit Graph

11377 Commits

Author SHA1 Message Date
Tomasz Wlostowski 045d02f818 router: add strict/loose area restriction constraint. WIP 2021-02-25 17:18:23 +01:00
Tomasz Wlostowski 24574aa2f5 router: first insert intersections, then build graph in Walkaround() 2021-02-25 17:18:23 +01:00
Tomasz Wlostowski 61e75a838b router: replace large stack variables with std::array 2021-02-25 17:18:23 +01:00
Tomasz Wlostowski 028f209126 router: more robust LINE::Walkaround() implementation 2021-02-25 17:18:23 +01:00
Tomasz Wlostowski e9c55cd0e3 router: if the drag anchor is not reachable by the mouse, use the closest point on dragged trace for optimizer restriction
Fixes: #4056
2021-02-25 17:18:23 +01:00
Tomasz Wlostowski a141ed3444 router: feed view size change events to the router engine 2021-02-25 17:18:23 +01:00
Tomasz Wlostowski 12dfb541fc router: expose current view area to the router algorithms so that the optimizer could know not to mess with traces/vias not currently visible to the user (wip) 2021-02-25 17:18:23 +01:00
Tomasz Wlostowski 2831c7d24c router: fix compile error in DRAGGER 2021-02-25 17:18:23 +01:00
Tomasz Wlostowski b67e5768a6 router: feature to save debug event log & board dump for easier recreation of router bugs and misbehaviours 2021-02-25 17:18:23 +01:00
Tomasz Wlostowski ebdc68ac1d router: correctly handle line width in PREVIEW_ITEMs 2021-02-25 17:18:23 +01:00
Tomasz Wlostowski 34c037684b router: partially migrate SHOVE algorithm to use new DEBUG_DECORATOR 2021-02-25 17:18:23 +01:00
Tomasz Wlostowski 0e6cf3f56e router: fix board edge clearance queries
Fixes: #7254
2021-02-25 17:18:23 +01:00
Tomasz Wlostowski 4574f52eac router: DRAGGER::CurrentNode() should always return non-null value 2021-02-25 17:18:23 +01:00
Tomasz Wlostowski e221b11e3b GRID_HELPER: fixed arithmetic issue in segment snap distance check disguised as 'excessive optimization' by the dragger in the router 2021-02-25 17:18:23 +01:00
Tomasz Wlostowski 325300bd76 router: don't use compound pad shapes if pad contains a single primitive shape 2021-02-25 17:18:23 +01:00
Tomasz Wlostowski a4bd2ad8c6 router: drag in walkaround mode now works 2021-02-25 17:18:23 +01:00
Tomasz Wlostowski f84836f51e router: factor out POSTURE_SOLVER to more generic MOUSE_TRAIL_TRACER class 2021-02-25 17:18:23 +01:00
Tomasz Wlostowski af95235f47 router: report debug log events from DRAGGER 2021-02-25 17:18:23 +01:00
Tomasz Wlostowski 0306d16748 router: make post-drag optimization less intrusive
Fixes: #5918
2021-02-25 17:18:23 +01:00
Tomasz Wlostowski 14ce7a0ad7 router: implement area constraint in optimizer 2021-02-25 17:18:23 +01:00
Tomasz Wlostowski 64cf593ee9 router: debug points now have variable size 2021-02-25 17:18:23 +01:00
Jeff Young b8c95345d0 Make sure reporters have a better default path than /bin. 2021-02-25 15:05:26 +00:00
Jeff Young caa18c8e16 Fix bugs in diffPair hole-to-hole logic and add rule resolution.
Fixes https://gitlab.com/kicad/code/kicad/issues/7697
2021-02-25 14:23:02 +00:00
Jeff Young 2c009906e5 Set unprinted layer colors to background.
This allows our Black&White special cases to still work when the
hole annular rings aren't being printed.

Fixes https://gitlab.com/kicad/code/kicad/issues/7692
2021-02-25 14:23:02 +00:00
Jon Evans bba7fae104 Coverity fixes 2021-02-24 22:55:11 -05:00
Jeff Young c077612163 Make sure custom shaped pad primitives get their parents set.
Fixes https://gitlab.com/kicad/code/kicad/issues/7696
2021-02-24 22:53:58 +00:00
Jeff Young d384316335 Fix some layout issues in board stackup pane.
Also decided the extra paramaters on the right weren't working out
on smaller screens and so moved Board Finish to its own panel.
2021-02-24 21:42:00 +00:00
Jeff Young fa89263c8f Push hole-to-hole min processing down a level.
Also removes adding the track width to the via gap, which was
never right.

Fixes https://gitlab.com/kicad/code/kicad/issues/7173
2021-02-24 21:42:00 +00:00
Seth Hillbrand 0bab025832 Fixup toolchaining for immediate mode
The move tool can stack on others, so when we re-enter the previous tool
this caused another immediate action.  We flag re-entry in the tool
stack to check for this and avoid unexpected tool starts
2021-02-24 10:44:54 -08:00
Jon Evans 3d7c202192 Fix pad clearance bounding box and initial display
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7673
2021-02-23 22:15:39 -05:00
Jon Evans 887ad1c30d CHANGED: Copper layer count is now set on physical stackup page
REMOVED: Board layer stackup presets that were not very useful

Fixes https://gitlab.com/kicad/code/kicad/-/issues/6765
2021-02-23 21:31:12 -05:00
Jon Evans d087ede21d Don't show ratsnest on layers hidden by contrast mode
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7667
2021-02-23 20:07:46 -05:00
Jon Evans aedc65f20f Fix footprint editor default grid
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7659
2021-02-23 20:07:46 -05:00
Seth Hillbrand 0518d9c546 Add more force-immediate tools 2021-02-23 17:05:03 -08:00
Seth Hillbrand 005622027f Add component/footprint is always immediate
When a user clicks on the "Add Component", "Add Power" or "Add Footprint"
icon, they want to add the item.  Requiring an extra click on the screen
before selecting the component/footprint is not needed.
2021-02-23 16:15:31 -08:00
Jeff Young f30eab422e Don't allow footprint text item columns to be resized.
We auto-size them in the code and doing both produces nothing but a
mess.

Also improves the auto-sizing for the layers drop-down (particularly
needed for the new, somewhat longer, layer names.

Fixes https://gitlab.com/kicad/code/kicad/issues/7671
2021-02-23 17:46:15 +00:00
Jeff Young b48071015b Don't reset focus flag yet on non-GTK platforms. It's required.
Fixes https://gitlab.com/kicad/code/kicad/issues/7671
2021-02-23 17:46:15 +00:00
Seth Hillbrand 154d56b4f4 If items exist on the "Rescue" layer, prompt user
Don't allow Rescue items to enter the board design.  This prompts the
user to either delete them or move them to the Comments layer.
2021-02-23 09:25:00 -08:00
Jeff Young 7f892669cc Consistent punctuation. 2021-02-23 12:46:27 +00:00
Jeff Young b1943bf6b6 Don't shout at the user. 2021-02-23 12:45:37 +00:00
Jeff Young a3b9e8ddb4 Round 2 of Worksheet -> Drawing Sheet. 2021-02-23 11:57:44 +00:00
Seth Hillbrand 2013a801d1 Fix zone merge undo
Also remove an implicit zone merge that was happening when the user
edited the zone parameters.  This appears to have been a feature but it
happened without a) telling the user and b) having the option to prevent
it.

Fixes https://gitlab.com/kicad/code/kicad/issues/7661
2021-02-22 15:45:17 -08:00
Seth Hillbrand b484c0787b Disable commands in SingleTop
We cannot do forward/reverse annotation in Single Top mode because we
depend on shared memory access.  This disables the menu options in this
case and replaces the toolbar update pcb icon with the import netlist,
which is more appropriate for single top mode

Fixes https://gitlab.com/kicad/code/kicad/issues/7637
2021-02-22 14:49:13 -08:00
Seth Hillbrand bac7b3e77a Protect against dynamic_cast
Items might not be FOOTPRINT, in which case the dynamic_cast will return
nullptr.  Check for this in the subfunction
2021-02-22 10:12:54 -08:00
Seth Hillbrand 26995b10fb Fix uninitialized ptr 2021-02-22 10:07:40 -08:00
Jeff Young cad5198ab7 Worksheet -> (industry standard) Drawing Sheet. 2021-02-22 17:35:46 +00:00
Seth Hillbrand a6263fc595 Remove superfluous "Rebuild Ratsnest" button
This happens when clicking OK already and there is nothing to change
before then.
2021-02-22 09:16:20 -08:00
david-beinder c1aa50e522 Notify control when removing items without parent
Fixes https://gitlab.com/kicad/code/kicad/issues/7441
2021-02-22 14:00:13 +00:00
Roberto Fernandez Bautista 09ebfcd650 CADSTAR Importer: Fix Code Style
- Rename member variable names to use the 'm_' prefix
- Rename a few object types that clashed with KiCad object names, such
  as BOARD and SCHEMATIC, to avoid the use of '::' to access the KiCad
  objects.
- Remove some unused code.
2021-02-22 13:24:00 +00:00
Jon Evans 67f16110af Fix netlist QA after API changes in 8a12aa4e 2021-02-21 20:30:57 -05:00
Jeff Young ba2d0cdd62 Nullptr safety. 2021-02-22 01:14:06 +00:00
Jon Evans 68b81c8271 Don't copy footprint text along with the footprint
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7647
2021-02-21 19:59:16 -05:00
Jon Evans 6fa0ac45af Re-enable custom grid settings for Pcbnew
Add a reset button that will only show up if the user
edits the JSON configuration for grids. This is a temporary
measure until we have a real grid editor GUI in V7.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7595
2021-02-21 15:33:13 -05:00
Jeff Young 2d28ed8eda Move canvas backend selection to Preferences.
Fixes https://gitlab.com/kicad/code/kicad/issues/7630
2021-02-21 20:12:43 +00:00
Jon Evans 3bc9d7b95e Rework GAL layer enum to fix visibility import from legacy boards 2021-02-21 13:41:43 -05:00
jean-pierre charras fbf12cb85c microwave tools: use ShowQuasiModal instead of ShowModal to display WX_TEXT_ENTRY_DIALOG dlgs
In some cases ShowModal does not work fine with our events handlers, at least on Windows.
Fixes #7641
https://gitlab.com/kicad/code/kicad/issues/7641
2021-02-21 16:01:53 +01:00
jean-pierre charras 8beeb368d2 Scripting: Fix missing utf8 to unicode string conversion in swig file
So non ASCII7 chars in .py filenames were non working, especially on Windows.
Fixes #5507
https://gitlab.com/kicad/code/kicad/issues/5507
2021-02-21 11:38:10 +01:00
Seth Hillbrand 8a12aa4e3a Handle unit changes in the netlist
Each symbol unit in eeschema has a unique identifier.  But we don't have
a unique identifier for the entire symbol.  So changing which symbol
instance was unit A (our default base for matching), changed the UUID
that we were using to match the footprints.

This commit adds all UUIDs to the netlist, allowing us to match symbol
to footprint without worrying about which unit is referenced.

This still does not handle changing different units on different sheets.

Fixes https://gitlab.com/kicad/code/kicad/issues/7604
2021-02-20 20:11:49 -08:00
Mikolaj Wielgus 2a9d76f1e3 Pcbnew: Fix snapping segment traces and graphics when initiating move
Fixes https://gitlab.com/kicad/code/kicad/issues/4746
2021-02-20 20:29:43 +00:00
Jeff Young a6c5c40f02 Fix another case of treating a modal return result as a bool.
Fixes https://gitlab.com/kicad/code/kicad/issues/7629
2021-02-20 18:22:34 +00:00
Jeff Young 9dacd4abb7 Don't allow footprint children in groups outside their footprint.
Fixes https://gitlab.com/kicad/code/kicad/issues/7625
2021-02-20 18:09:56 +00:00
Marek Roszko 622baa6531 Silence more unused exception var warnings 2021-02-20 12:01:51 -05:00
Marek Roszko c12666ec43 Fix arg type of NODE::followLine 2021-02-20 11:58:55 -05:00
Marek Roszko 6fce39607e Fix return type within pointInside2 2021-02-20 11:58:55 -05:00
Marek Roszko 907e282347 Silence some msvc warnings
- exception variables that were unused
- RAYSEG2D improperly foward declared with class instead of struct
- unused vars
2021-02-20 11:58:55 -05:00
Jon Evans ec334f172b Fix some issues with reloading of action plugins
First issue: the C++ action plugins list should be cleared so that any
plugins that fail to reload do not hang around on the toolbar.
This is fixed on the C++ side.

Second issue: inner dependencies of plugins that are modules were not
reloaded before, which broke reloading for many plugin examples out there.
This is fixed on the Python side by keeping track of dependencies and
clearing them out before reloading a module (unfortunately there doesn't
seem to be a way to do this in the standard library)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7245
2021-02-20 11:19:33 -05:00
Jeff Young 91e876ce0d Make sure the title is updated when file is saved/reverted/etc.
Fixes https://gitlab.com/kicad/code/kicad/issues/7626
2021-02-20 15:09:47 +00:00
Jeff Young 67c7e7c759 Formatting. 2021-02-20 15:09:47 +00:00
Jeff Young d4e68a985c Formatting. 2021-02-20 15:09:47 +00:00
Jeff Young e89f9db438 Footprint disallow layer checking needs to be based on courtyards.
Fixes https://gitlab.com/kicad/code/kicad/issues/7620
2021-02-20 14:13:36 +00:00
Jeff Young 0337c42d25 Swap courtyards when flipping footprint. 2021-02-20 14:13:36 +00:00
Jeff Young ba63ac801a Don't make assumptions about what layers things are on. 2021-02-20 14:13:36 +00:00
Jeff Young a1f09befe0 Vias are plated holes too.... 2021-02-20 14:13:36 +00:00
jean-pierre charras be25b7a132 Use ShowQuasiModal to show a few dialogs.
This change is mainly due to the fact Modal dialogs do not work when our
current tool is the tool used to create new item (text, zone, graphic).
If when this tool is active, one try to edit the properties of the new item
being created (or being placed) the modal dialog does not capture the event tool
and hangs (cannot be dismissed)
Our quasi modal dialogs have their own event loop and work.
Fixes #7585
https://gitlab.com/kicad/code/kicad/issues/7585
2021-02-20 14:24:57 +01:00
Zoltan Gyarmati 5a0a2a8366 pcbnew: only update cursor instead of activating selection tool when quiting delete tool
Fixes: https://gitlab.com/kicad/code/kicad/issues/7531
2021-02-20 06:40:00 +00:00
Jeff Young 881cb3182b Move writable dir checking lower down.
(Well, it was already lower down, this really just removes the higher
up calls that were getting in the way.)

Fixes https://gitlab.com/kicad/code/kicad/issues/5937
2021-02-19 22:24:08 +00:00
Jeff Young 5994ce3711 Be more aggressive about updating title to show dirty status.
Fixes https://gitlab.com/kicad/code/kicad/issues/7613
2021-02-19 21:58:49 +00:00
Jeff Young e3560e6414 Add parent property to footprint children. 2021-02-19 21:06:45 +00:00
Jeff Young c2f68ca4da Whittle down library tree context menus to be more contextual.
(From discussion on Zulip.)
2021-02-19 19:07:45 +00:00
jean-pierre charras d0b91b1106 Router, place via: fix issue created by 45b2bc: cancelling via must be made
only when the select layer is called.
Fixes #7606
https://gitlab.com/kicad/code/kicad/issues/7606
2021-02-19 17:28:20 +01:00
Zoltan Gyarmati bbe2ee39a0 pcbnew: actually reload DRC parity checkbox value in project mode
Fixes https://gitlab.com/kicad/code/kicad/issues/7551
2021-02-19 00:37:29 +00:00
Seth Hillbrand 54282dffe3 Move preview items using FP orientation
Fixes https://gitlab.com/kicad/code/kicad/issues/7600
2021-02-18 16:32:40 -08:00
Jeff Young 828cdacc6f Add some missing tooltips.
Fixes https://gitlab.com/kicad/code/kicad/issues/7582
2021-02-18 18:33:52 +00:00
PJM c001c26575 Pcbnew: Drag selections containing only tracks or vias
CHANGED: If the user made a selection and then tried dragging it, the
drag would only succeed if the selection contained at least one
footprint.  Selections with only tracks and vias would instead make
KiCad drag a new selection box.

This MR allows routing of selections of a single track or via, while moving
selections containing more than one item, whether or not they also contain
a footprint.

Fixes https://gitlab.com/kicad/code/kicad/issues/7539
2021-02-18 17:49:48 +00:00
Jon Evans b2cd97fd84 Don't rotate/flip footprint texts along with the footprint 2021-02-18 12:39:28 -05:00
Jeff Young 66b33834b5 Always enable save; move dirty bit to asterisk in title bar.
Also unifies PCB Editor and Schematic Editor names with other
locations in the GUI (which were still Pcbnew and Eeschema).

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

Fixes https://gitlab.com/kicad/code/kicad/issues/7594
2021-02-18 16:05:42 +00:00
Jeff Young 45b2bce698 Cancel placement of via if user cancels layer selection.
Fixes https://gitlab.com/kicad/code/kicad/issues/7578
2021-02-18 11:53:36 +00:00
Jeff Young 59b81462ab Fix button lay out issue on OSX. 2021-02-18 11:53:36 +00:00
Jeff Young 6a5bba2a80 We don't really want users hand-editing library table files.
Fixes https://gitlab.com/kicad/code/kicad/issues/7591
2021-02-18 11:53:36 +00:00
Seth Hillbrand 25e78162c8 Cleanup icons
- Adjust group/ungroup
- Use Mirror triangles for rotate
- Smooth goto badge
2021-02-17 17:26:16 -08:00
Jeff Young b2a4cbedda Add conditions for rotate/group/lock items in toolbar.
Also fixes cut/copy/delete conditions to allow use in immediate mode.
2021-02-18 00:10:41 +00:00
jean-pierre charras 5d2dc0b50e Fix a few (minor) issues:
- Make DIALOG_SHIM::SetPosition working)
- rename PCB_BASE_FRAME::SelectLayer() to PCB_BASE_FRAME::SelectOneLayer()
- PCB_BASE_FRAME::SelectOneLayer(): make dismiss dialog by escape key working.
Fixes #7578
https://gitlab.com/kicad/code/kicad/issues/7578
2021-02-17 20:56:43 +01:00
Jeff Young 34c2028e7b Assign via net before running DRC checks.
Fixes https://gitlab.com/kicad/code/kicad/issues/7579
2021-02-17 19:39:56 +00:00
Jeff Young 0c2870c65f Fix missing check against DELETED_BOARD_ITEM::GetInstance().
Fixes https://gitlab.com/kicad/code/kicad/issues/7575
2021-02-17 19:39:56 +00:00
Jeff Young b6a7981e62 Write changes back to grid after using file explorer.
Fixes https://gitlab.com/kicad/code/kicad/issues/7361
2021-02-17 14:08:53 +00:00
Jeff Young d66de5bb35 Exclude footprints and groups from VIA_PLACER DRC testing.
(Their children need to get tested, but not the parent objects
themselves.)

Fixes https://gitlab.com/kicad/code/kicad/issues/7569
2021-02-17 14:08:53 +00:00
Jeff Young cc11c8d45f Fix change in preference panel name.
Fixes https://gitlab.com/kicad/code/kicad/issues/7563
2021-02-17 14:08:53 +00:00
Jeff Young 6f9ebcfdb5 Make sure a pad has a hole before running hole test on it.
Fixes https://gitlab.com/kicad/code/kicad/issues/7567
2021-02-17 14:08:53 +00:00
Marek Roszko b609c7dcd6 Kick the osx specific path helpers into PATHS 2021-02-16 23:29:26 -05:00
Jon Evans ba6aa3e034 Pcbnew: allow multiple selection of footprint text
With the selection filter and other improvements, we no longer
need to use this workaround to prevent accidental selections.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7527
2021-02-16 22:40:23 -05:00