Commit Graph

12442 Commits

Author SHA1 Message Date
jean-pierre charras 0533196294 Fix Coverity warnings 2021-10-15 09:24:16 +02:00
Seth Hillbrand faba2b06c2 Lock track width after placing segment
We don't want to allow the full track width to change after placing a
segment when we are in follow-segment mode. This would require either
ripping up and re-solving the existing track or allowing potential DRC
errors.

Fixes https://gitlab.com/kicad/code/kicad/issues/9395
2021-10-14 09:21:14 -07:00
Seth Hillbrand 07b9e2ee51 Fix errant debug message
__WXDEBUG__ is only for internal WX debugging and is always enabled even
on release builds because it is defined to be 0, 1 or 2.  Use DEBUG to
limit to debug builds

Fixes https://gitlab.com/kicad/code/kicad/issues/9392
2021-10-13 09:16:55 -07:00
Seth Hillbrand 95ec23247c Initialize zone vars in CTOR 2021-10-13 08:59:48 -07:00
Seth Hillbrand 5a6f230a2c Delete full track needs proper scoping
This should not run if the action is "Cut".  Additionally, we need to
transfer the expanded selection to selectionCopy in order for it to
proceed with the deletion.  There is also no need for this to be limited
to the Hover action, so this section was removed.

Fixes https://gitlab.com/kicad/code/kicad/issues/9385
2021-10-12 13:47:16 -07:00
Seth Hillbrand 35e90d0cf4 Allow changing router mode while routing
Keeps shove active even when not using to allow switching modes during
routing.

Fixes https://gitlab.com/kicad/code/kicad/issues/9342
2021-10-12 09:55:34 -07:00
Seth Hillbrand 7f1247a23c Update track width when changed
Tracks starting from pads should change in response to the track width
changing despite having the "follow existing track" width selected.
2021-10-12 09:55:34 -07:00
Mikolaj Wielgus 5f53019290 Substitute all wxHtmlWindow with HTML_WINDOW
Remove other places where <body> tag is used to override the default
black-on-white theme.
2021-10-12 07:07:15 +00:00
Seth Hillbrand 1b7358f93a Import layer settings before swapping boards
The rebuildLayerStackPanel() reads from the current board to setup the
panel.  We maintain the board swap until after the setup is completed

Fixes https://gitlab.com/kicad/code/kicad/issues/9370
2021-10-11 11:47:22 -07:00
Seth Hillbrand 58f553a9ca Check for layer when DRC on vias and non-zone items
We were already checking for zone-zone overlap but missing checks when
running against (possibly) buried vias as well as the general check

Fixes https://gitlab.com/kicad/code/kicad/issues/9366
2021-10-11 10:33:50 -07:00
Seth Hillbrand fce054319c Update DRC MatchDPSuffix routine
This matches the router matchDPSuffix routine until we merge the two
into a common utility
2021-10-11 10:33:50 -07:00
Roberto Fernandez Bautista 43e59b0ea7 CADSTAR PCB: Correctly handle associated pad ids and PCB Only pads
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9372
2021-10-11 18:30:20 +01:00
Roberto Fernandez Bautista 7a71ebf9ac CADSTAR PCB: Load all three net properties into a single Netclass
The final netclass name will be a bit long but it will allow for custom
DRC rules to individually target each of the three properties available
in CADSTAR:
- Route Code (which specifies width of the track in min, max, opt)
- Net class (only used in signal integrity analysis)
- Spacing class (for specifying clearance requirements between classes)
2021-10-10 22:16:08 +01:00
Roberto Fernandez Bautista e9030283cc Fix formatting 2021-10-10 22:16:08 +01:00
Seth Hillbrand 93bbad6acf Allow snapping in pickReferencePoint
Fixes https://gitlab.com/kicad/code/kicad/issues/9354
2021-10-10 08:53:10 -07:00
Seth Hillbrand 62cb5d9354 Fully cancel copy with reference
Tool needs to be popped when cancelling to allow selection tool to work properly.

Fixes https://gitlab.com/kicad/code/kicad/issues/9353
2021-10-10 08:31:18 -07:00
Ian McInerney 4d89061d4c Support footprint arcs in convert to polygon
Fixes https://gitlab.com/kicad/code/kicad/issues/9352
2021-10-10 16:26:23 +01:00
Seth Hillbrand 6620831d38 Clear edited point when exiting point editor
Failing to clear this will prevent selection where tools check for
edited points before processing mouse button down events

Fixes https://gitlab.com/kicad/code/kicad/issues/9357
2021-10-10 08:25:50 -07:00
Roberto Fernandez Bautista 0fa8e1f311 DRC Control: Clear pointer to MARKER after it has been centered
Also, added asserts to verify SelectMarker and CenterMarker actually
do select one.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9344
2021-10-10 16:22:04 +01:00
jean-pierre charras 593324bbaa Do not use non ASCII7 chars in English strings.
Fix UTF8 to unicode conversion issue.
Fixes #9356
https://gitlab.com/kicad/code/kicad/issues/9356
Fixes #9355
https://gitlab.com/kicad/code/kicad/issues/9355
2021-10-10 10:32:31 +02:00
Roberto Fernandez Bautista ac3ade874e CADSTAR PCB: Set Copper-to-Hole clearance as 0
Testing suggests that CADSTAR doesn't actually have any clearance to the
hole (other than electrical clearance to the barrel of the padstack/
viastack).

This removes a large amount of DRC violations on imported designs.
2021-10-10 00:20:13 +01:00
Roberto Fernandez Bautista eb7d0fdf8a CADSTAR PCB: Use board clearance + additional isolation as zone clearance
Copper-to-copper clearance is too onerous and results in large amount
of DRC errors for the majority of imported designs.
2021-10-10 00:18:36 +01:00
Roberto Fernandez Bautista f4ff01a5ab CADSTAR PCB: Copy default netclass settings when creating new ones
Ensures that the global clearance is preserved in the newly created
netclass.
2021-10-09 23:10:55 +01:00
Seth Hillbrand 41e7284fdc Speed up pcbnew loading/updating
Rather than detaching and re-attaching the layer panels with the
attendant overhead, we keep each panel intact and only update its
contents.  Since the bindings are the same, this saves substantial time
on pcb loading as well as when closing the board setup dialog
2021-10-09 13:38:35 -07:00
Roberto Fernandez Bautista 8f74085ca4 CADSTAR PCB: Handle older boards without construction layers
Use KiCad default stackup for older CADSTAR boards that do not
define any dielectric layers between the electrical layers.

Also fix default stackup calculation to ensure finished board thickness
is 1.6mm
2021-10-09 21:26:16 +01:00
Roberto Fernandez Bautista d62a5ecf46 Remove unused GetPcbThickness() function in PANEL_SETUP_BOARD_STACKUP
The function used now is computeBoardThickness()
2021-10-09 20:35:10 +01:00
Roberto Fernandez Bautista 33a3cfc87b CADSTAR PCB: Update Board Design Settings to notify that a stackup exists
Also update thickness of the PCB

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9307
2021-10-09 20:33:14 +01:00
Roberto Fernandez Bautista e80a1c2679 CADSTAR PCB: Don't load items on invalid layers
This was happening in two cases:
- Loading documentation symbols (CADSTAR on purpose defines these in an
  invalid layer)
- When an item was in a "layer set" such as ALLELEC or ALLLAYER - need to
  make sure we remove the copper layers that are not active in the design
2021-10-09 20:07:23 +01:00
Ian McInerney 895f4ca989 Cleanup 3D model filename validation
Don't veto the changed event anymore and instead just display the
feedback in the error column of the grid.
2021-10-08 22:30:20 +01:00
Ian McInerney 8d71bdc3e1 Cleanup unit handling in the stackup drawing tool 2021-10-08 22:30:20 +01:00
Roberto Fernandez Bautista 677166f0b8 CADSTAR PCB: Rule Areas have zero width
Cadstar areas have a line width but this is only for display purposes.
Instead CADSTAR uses the center line when determining whether a DRC
violation occurred.
2021-10-08 21:27:32 +01:00
Roberto Fernandez Bautista 2dfbd42be6 CADSTAR PCB: Legacy netclass and design settings loading is required 2021-10-08 20:48:10 +01:00
Roberto Fernandez Bautista ae0229b7c9 CADSTAR PCB: Add imported nets to the imported netclass. 2021-10-08 20:25:09 +01:00
Roberto Fernandez Bautista 58fc4f512d CADSTAR PCB: Don't create zero width tracks
Fixes a bug in the route offsetting part of the import
that was resulting in zero-width tracks being imported.
2021-10-08 20:25:09 +01:00
Roberto Fernandez Bautista 16b61e47cd CADSTAR PCB: Clear arcs from polys before boolean ops (e.g. zone fills) 2021-10-08 20:25:09 +01:00
Roberto Fernandez Bautista fb588da875 CADSTAR PCB: Fix loading of thermal relief gap in zones
We were loading as solid fill when the relief gap was exactly the
same as the minimum width.

Also we can do better than just load as solid fill when it is smaller:
we can instead just use the minimum width and at least it still will
have thermal reliefs.
2021-10-08 17:39:08 +01:00
jean-pierre charras 4d6b1a4e36 pns_diff_pair_placer: fix empty message when a signal of a pair is not found.
Fixes #9334
https://gitlab.com/kicad/code/kicad/issues/9334
2021-10-08 14:57:01 +02:00
Roberto Fernandez Bautista cb47bf25c0 CADSTAR PCB: Actually load the original route code as a KiCad NETCLASS
We weren't actually loading it into the design settings even though
everything else was already being correctly loaded.
2021-10-07 22:13:06 +01:00
Seth Hillbrand f9c83dbc44 Fix footprint type memory
The flags don't map quite right, so we keep the memory of the drop-down
and translate to flags.  This protects against flag values changing
2021-10-07 11:29:51 -07:00
Seth Hillbrand 51d3440c38 Use footprint type to inform new pad type
Makes usage cleaner.  If the user specifies that they are creating an
SMD, they should get SMD pads by default so that they don't have to
change them later.

Fixes https://gitlab.com/kicad/code/kicad/issues/9333
2021-10-07 11:10:26 -07:00
Jeff Young 57c7d663b0 Fix bone-headed mistake when moving panel disabling. 2021-10-07 00:17:42 +01:00
Seth Hillbrand ad85f8078a Reverse escaping when transferring multi-line
We escape the strings coming out of the DIALOG_TEXT_PROPERTIES window,
so we need to unescape the ones coming in

Fixes https://gitlab.com/kicad/code/kicad/issues/9327
2021-10-06 13:25:03 -07:00
Seth Hillbrand a8ec3b58ed Use via's real drill value for hole size
If the via drill is "Default" be sure to get the default value rather
than the placeholder

Fixes https://gitlab.com/kicad/code/kicad/issues/9313
2021-10-06 11:00:58 -07:00
Jeff Young 1bb5fc3fd6 Work around EnsureVisible bug in wxWidgets during DRC cross-probe.
Also adds double-click-marker to open DRC dialog and select marker
in list.

Fixes https://gitlab.com/kicad/code/kicad/issues/7246
2021-10-06 11:17:03 +01:00
Jeff Young 95f841a037 A more nuanced method of making Board & Schematic Setup read-only.
This one still allows you to scroll to see all contents.

Fixes https://gitlab.com/kicad/code/kicad/issues/9302
2021-10-06 11:16:46 +01:00
Seth Hillbrand 9a8d1246cc We don't keep a CHANGELOG.TXT
Direct interested readers to AUTHORS.TXT instead.
2021-10-05 19:46:53 -07:00
Seth Hillbrand 548e5f49bd Clean up unused variable usage
Unused variables in function calls can be commented out.  Unused
return variables get a new routine `ignore_unused()` that silences the
warnings with zero overhead.
2021-10-05 10:00:30 -07:00
Jeff Young 92008a089a Disable Board & Schematic Setup controls when project is locked.
(or missing).

Fixes https://gitlab.com/kicad/code/kicad/issues/9302
2021-10-04 16:47:27 +01:00
Jeff Young ffd6fde700 Improve consistency and hotkey access in Appearances.
Added hotkey for cycling through net & netclass color modes.
Added hotkey for cycling through ratsnest layer visibilities.
Added code to display hotkey (if set) on the above and on high-contrast
cycle.

Fixes https://gitlab.com/kicad/code/kicad/issues/9312
2021-10-04 13:44:43 +01:00
Jeff Young 930c4e5582 Cleanup.
Formatting.
Naming conventions.
Use of auto.
Use of STL cover types.
2021-10-03 19:42:29 +01:00