Jeff Young
43df863df2
Fix issue with caches not being initialized when printing msg bar.
2022-08-01 13:09:51 +01:00
Marek Roszko
a8505d9c76
SEARCH_RESULT -> INSPECT_RESULT
...
To fix the name squatting it's doing for future functionality
2022-07-29 20:01:10 -04:00
Jeff Young
f41af10007
Clean up hole shapes for safety (smart pointer) and consistency.
2022-07-22 23:06:07 +01:00
Jeff Young
1ade5a8c72
Fix typo.
...
And clean up the code just a little to make it clearer.
Fixes https://gitlab.com/kicad/code/kicad/issues/12022
2022-07-17 17:04:04 +01:00
Mike Williams
3669cb4673
PCB Editor: Add User Background Images
2022-07-14 11:23:23 +00:00
Jeff Young
8a9bf02b7e
Smarten up silk clearance & tented item handling.
...
The inspection tool will report whether or not the item is tented
(indicating in that case that any clearance will only be applied
to any hole).
The DRC test ignores tented items without a hole, and runs the
clearance test against the hole for items with a hole.
Fixes https://gitlab.com/kicad/code/kicad/issues/11954
Fixes https://gitlab.com/kicad/code/kicad/issues/11951
2022-07-08 17:27:05 -06:00
Jeff Young
aad85a83da
Improvements to rotation/mirroring of dimensions inside footprints.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/11861
2022-06-20 22:25:39 +01:00
jean-pierre charras
d19705ac8c
FOOTPRINT::Flip(): add missing handle of dimensions.
2022-06-20 11:37:25 +02:00
Jeff Young
82ebc247b8
More performance enhancements for DRC.
2022-06-18 19:47:11 +01:00
Jeff Young
dee22a31d9
Expose footprint ID, description and keywords to property system.
2022-06-01 12:47:37 +01: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
37838dffb9
Make sure physical_clearance rules are run against courtyard layers.
2022-05-10 23:02:53 +01:00
Jeff Young
3bdae40881
Remove extra layer of parens.
2022-04-24 23:44:02 +01:00
Jeff Young
4cd48cd5c9
Fix some test issues.
2022-04-23 22:15:39 +01:00
Jeff Young
4525b1f085
More consistency in DRC error messages.
2022-04-23 09:39:34 +01:00
Jeff Young
ab131859f6
Bring footprint textvars in line with symbol textvars.
...
ADDED ${FOOTPRINT_LIBRARY} and ${FOOTPRINT_NAME} resolution.
2022-04-18 22:45:02 +01:00
jean-pierre charras
74c3ad0b3a
Shadow on locked fp: do not show if LAYER_MOD_FR or LAYER_MOD_BK is not shown
2022-04-12 11:17:04 +02:00
Jeff Young
73f835437e
Don't modify outer loop variable inside inner loop.
2022-03-19 19:37:01 +00:00
Jeff Young
5aa561abe1
Add overlapping pad test and share some tests between board & fp editor DRC.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10086
2022-03-18 19:58:42 +00: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
65185f53a1
Rotate fp zones before comparing with library versions.
...
Also includes some performance fixes to not copy around triangulation
data when it's not needed.
Fixes https://gitlab.com/kicad/code/kicad/issues/10143
2022-03-14 15:53:24 +00:00
jean-pierre charras
0440aa3d83
Extend layer LAYER_LOCKED_ITEM_SHADOW to draw shadow markers on other locked items:
...
tracks, texts, graphics.
2022-03-09 18:50:31 +01: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
Jeff Young
0dc857b5ab
Clean up pad handling in 3D viewer.
...
Most importantly, create F_Cu/B_Cu layers if they're otherwise empty
but we have plated pads to render on them.
Fixes https://gitlab.com/kicad/code/kicad/issues/10207
2022-03-06 13:57:12 +00:00
Jeff Young
843a56c4e4
Implement two-staged zone priority: assigned priority followed by UUID.
2022-03-01 14:53:35 +00:00
jean-pierre charras
2fddc9daf3
Pcbnew: fix missing connectivity update when adding an item.
...
Skipping connectivity update when adding an item is possible only when loading a file
Fixes #10879
https://gitlab.com/kicad/code/kicad/issues/10879
2022-02-18 13:24:14 +01:00
Jeff Young
2172810600
Performance: better sharing of zone fills.
2022-02-15 19:19:03 +00:00
Jeff Young
5ce559176d
Overhaul the font metrics calcs for overbar, italics and bboxes.
2022-02-07 17:36:40 +00:00
Jeff Young
7ccac79192
More wxString wide literals.
2022-02-05 21:29:34 +00:00
Marek Roszko
b9f1aaf029
Fix typoed test condition for TH no hole pads PVS V501
2022-02-05 11:31:56 -05: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
Jeff Young
5739505aa3
TextBoxes for PCBNew.
2022-01-31 20:00:47 +00:00
Jeff Young
4eac8d7c66
Remove unit-less angles from geometry lib APIs.
2022-01-20 21:10:04 +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
d485eb2514
Move pads to EDA_ANGLE.
2022-01-14 16:08:18 +00:00
Marek Roszko
fcfe42d67c
Continue the war on wxPoint
2022-01-10 19:52:26 -05:00
Marek Roszko
e4dbfcd92d
Swap out some wxSize for VECTOR2I
2022-01-04 20:42:27 -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
Jeff Young
d649b288a6
Swap out autoplace rotation costs for private footprint layers.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/2291
Fixes https://gitlab.com/kicad/code/kicad/issues/5391
2021-12-24 21:10:28 +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
ef10b36948
Add mask-to-copper clearance parameter and rename mask margin.
2021-12-24 12:36:41 +00:00
Jeff Young
32721755bf
Hook up zone-pad connections to custom rules.
...
ADDED zone_connection constraint.
ADDED thermal_relief_gap and thermal_spoke_width constraints.
ADDED angle override for thermal relief spokes in Pad Properties.
Fixes https://gitlab.com/kicad/code/kicad/issues/4067
2021-12-23 22:30:26 +00:00
Jeff Young
0a609dd48d
Add footprint library checking to DRC.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/6821
2021-12-23 19:18:45 +00:00
Jeff Young
3af65936c1
Don't consider heatsink, castellated or fiducial pads for THT vs SMD.
...
Also fixes a bug where the Footprint Checker's marker list wasn't cleared
correctly from the last run.
Fixes https://gitlab.com/kicad/code/kicad/issues/9821
2021-11-29 16:45:42 +00:00
david-beinder
fd6a75b779
Do not call TransformToPoly for negative sized PADs
2021-11-12 15:40:08 +00:00
Jeff Young
22ba640c2b
Remove locking from footprint editor.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/9496
2021-10-31 16:33:03 +00:00
Wayne Stambaugh
1f7fd436a2
Move board object polygon code into the object source files.
...
Having the board object polygon code all defined in a separate file made
finding the polygon code for an object difficult to find.
2021-10-25 17:42:11 -04:00
Jeff Young
fecb53b64f
Clean up removal of separate front & back footprint text visibility.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/9441
2021-10-22 21:14:15 +01:00
jean-pierre charras
40e6a9a926
Fp editor: add DRC test for through hole pads without hole.
2021-10-19 14:47:29 +02:00
Jeff Young
a41944020d
Push most of PCB_SHAPE impl down in to EDA_SHAPE.
2021-10-15 12:45:43 +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
Jon Evans
e2368b733c
Allow selection of NPTH pads with zero copper size
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9249
2021-09-26 18:17:50 -04:00
Seth Hillbrand
3e7310a219
Move FP type check to FP DRC
...
Checks for validity are better centrally located where they don't
interrupt user actions
2021-09-25 08:56:27 -07:00
Seth Hillbrand
963a8ee42d
Warn users when creating footprints about mismatch
...
Checks to see if the footprint attribute matches the type of pads
contained in the footprint. Can prevent issues during fabrication if
users forget to adjust them during creation.
Fixes https://gitlab.com/kicad/code/kicad/issues/9215
2021-09-24 13:48:01 -07:00
jean-pierre charras
1cf1a23250
footprint.cpp: seriously speedup CoverageRatio() and GetCoverageArea().
...
Previoulsy, they calculated the area of polygons after using Simplify() and Fracture().
But polygon areas can be easily calculated without these transforms.
So they are just removed (they are really time consummig).
2021-09-13 13:41:36 +02:00
Jeff Young
e6ca9837a2
Clear numbers from non-numberable pads and don't run DRC on them.
...
This was also the last straw on the misnamed PAD::GetName() and
PAD::SetName(), which are now PAD::GetNumber() and PAD::SetNumber().
Fixes https://gitlab.com/kicad/code/kicad/issues/9017
2021-08-24 01:03:06 +01:00
jean-pierre charras
82849eda42
Fp editor: fix some crashes when trying to duplicate referece or value texts.
...
Fixes #8990
https://gitlab.com/kicad/code/kicad/issues/8990
2021-08-18 15:34:32 +02:00
jean-pierre charras
ca42f31bb5
Pcbnew, update footprint: fix loss of net info in some cases.
...
When pads having a similar name but some were not on a copper layer
(aperture pads) the net info update from old footprint to the new footprint
was incorrectly transferred. Now, only pads on copper layers are considered.
Fixes #8979
https://gitlab.com/kicad/code/kicad/issues/8979
2021-08-16 20:52:49 +02:00
Jeff Young
1a252b4f96
Add a compile error for ill-defined rules, and more performance.
...
Also adds const-safety to GetBoard().
2021-08-16 12:14:17 +01:00
Jeff Young
98d0ce00ee
Defensive coding.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8790
2021-08-12 21:35:05 +01:00
jean-pierre charras
ac933d4e83
Fp editor: avoid having nil uuids when editing old footprints.
...
In Fpeditor, nil uuid has a special meaning and cannot be used as uuid in fp items.
Fixes #8914
https://gitlab.com/kicad/code/kicad/issues/8914
2021-08-04 12:37:52 +02:00
Jeff Young
6aaf4413b3
Fix kicad_string.h / string.cpp mismatch.
...
They don't define a KiCad string class, so the header file name was
somewhat misleading. But the fact that they didn't match definitely
made coding more difficult.
2021-07-29 16:03:25 +01:00
Jeff Young
0fb864d596
Pull some name changes back from 7.0 to ease merging.
2021-07-21 20:58:59 +01:00
Wayne Stambaugh
27e9750507
Pcbnew: fix footprint selection bug.
...
Do not remove footprint objects from list of selected objects when there
are no drawable objects other than the reference and value text.
Increase the minimum size rectangle for footprints from 0.025mm to 1mm
when the footprint has no drawing objects so that it is easier to select
the footprint in this case.
Add some pretty colors to the footprint bounding box and hull outline
so that it's possible to tell the difference between selection areas.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8379
2021-06-23 19:46:33 -04:00
Jeff Young
096e342386
Prefix TRACK, ARC and VIA.
2021-06-11 22:07:02 +01:00
luz paz
f968fc8719
Fix source comment / documentation typos
2021-06-09 19:32:58 +00:00
Marek Roszko
10e60acf34
Clean up including of board_design_settings.h
2021-06-06 15:03:42 -04:00
Ian McInerney
4f05262705
Cleanup includes in board.h and footprint.h
2021-06-03 20:19:52 +01:00
Jon Evans
f6d6b7d263
Harmonize property names for zone/footprint/pad clearance and thermals
...
Use "override" instead of "local" for better clarity.
2021-05-29 14:12:23 -04:00
Marek Roszko
03cf2b517f
Enum class PAD_ATTR_T
...
Renamed such that python stays the same
2021-05-01 10:51:54 -04:00
Marek Roszko
21fde9b629
enum class PCB_SHAPE_TYPE_T
2021-04-30 22:36:12 -04:00
Ian McInerney
ecd9bf696e
Be consistent about using nullptr instead of 0
...
0 can be too easily overloaded into an int, so ensure we use nullptr
when we mean pointers.
2021-04-22 22:20:34 +01:00
Jeff Young
3b049b32cf
Show if pads, zones, and dimensions are locked in the status bar.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8255
2021-04-21 19:58:18 +01:00
Jeff Young
13473420e5
Remove duplicated routine and fix bug in UTIL version.
2021-04-17 15:10:59 +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
b6f2941a06
Another try a allowing touching courtyards.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8076
2021-03-31 22:54:30 +01:00
Jon Evans
f1c599fa4d
Tweak PCB selection behavior to reduce unintuitive behavior
...
We were discarding shapes too aggressively for having a
larger area than a shape underneath.
Let's also try showing fewer disambiguation menus, in particular
always preferring items on the active layer when the candidates
include overlapping items of similar area on other layers.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7949
2021-03-20 13:11:51 -04:00
Jon Evans
c04e19f9ac
Include optimization: move some things from common.h to point-of-use
2021-03-20 12:09:18 -04:00
Jeff Young
93db7a130a
Offset 3D models when moving footprint origin.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/7868
2021-03-12 17:37:38 +00:00
Jon Evans
18037e2f65
Rework bitmap system to load from archived PNGs
...
Bitmaps are now identified by an enum class instead of by pointers.
Bitmap loading and caching is now handled by a class in common, and
we no longer compile most bitmaps into the binary, so there is no
longer a bitmaps static library.
Instead, bitmaps are archived to a .tar.gz file which is installed
in ${KICAD_DATA}/resources/images.tar.gz
The source PNGs are checked in to Git as the original CPP files were,
so that people can build without the required dependencies to convert
SVGs to PNGs.
Initial support is also added for dark theme icons, although this
is not yet exposed in the GUI.
Stubs are present for multi-resolution image resources, but this is
not fully-baked yet and could use some refinement.
2021-03-11 08:37:35 -05:00
Dominik Wernberger
e2aa7be4b3
Added a lot of consts and refactored a few lines
2021-03-08 12:49:48 -08:00
Jeff Young
0fde536223
Adjust zones when moving footprint origin.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/7825
2021-03-07 15:04:01 +00:00
Jeff Young
c716313a24
Fix footprint hittesting. (How in the world did that compile?)
2021-02-26 17:44:36 +00:00
Jeff Young
86aaa2e9cb
Rationalize footprint bounding boxes and cache all of them.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/7720
2021-02-26 13:50:27 +00:00
Jeff Young
0337c42d25
Swap courtyards when flipping footprint.
2021-02-20 14:13:36 +00:00
Jeff Young
b08862e445
Fix group undo/redo bugs.
...
1) Don't remove items from group when the group is being deleted as
well. We need those pointers for undo/redo.
2) Flip the GROUP/UNGROUP undo status when undoing/redoing group and
ungroup actions.
3) Remove PCB_GROUP_T from the rebuild-netlists section. Nothing
about an item's group/ungrouped status changes its netlisting.
4) Add PCB_PAD_T to the rebuild-netlists section. It can probably
only happen in the footprint editor where we don't care about
netlisting, but it's conceptually more correct and who knows what
might change in the future....
Fixes https://gitlab.com/kicad/code/kicad/issues/7540
2021-02-15 14:13:43 +00:00
Seth Hillbrand
aa0db969ca
Caching ConvexHull routine
...
Stores a cache of the convex hull similar to the bounding box. Modifies
the hull based on actions to allow complex footprint graphics without delay
Fixes https://gitlab.com/kicad/code/kicad/issues/7341
2021-02-04 15:56:52 -08:00
Jeff Young
d261fa3792
Make sure items are removed from groups when deleted.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/7387
2021-02-02 14:23:29 +00:00
Jeff Young
8f4d2cf33b
Fix typo in footprint flip code.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/7224
2021-02-02 00:07:29 +00:00
Seth Hillbrand
54f5a47208
Remove confusing GetFirstPad() call
...
This no longer returns the first pad, just the first by pad sort order
in output. The call is not used correctly in pcbnew, so removing to
prevent future misuse
2021-02-01 12:03:26 -08:00
Dominik Wernberger
dc02ec9758
Remove a few const_cast
2021-01-12 20:51:31 +00:00
Dominik Wernberger
07635d2fc7
Minor adjustments
2021-01-12 20:51:31 +00:00
jean-pierre charras
08b93bd5ba
FOOTPRINT::GetBoundingHull(): avoid returning a empty hull SHAPE_POLY_SET,
...
when a footprint contains only texts.
empty SHAPE_POLY_SET creates most of time issues (crashes for instance) when
containing no data.
Ensure the returned SHAPE_POLY_SET contains a minimal hull (a 0.04 mm square)
Fixes #7026
https://gitlab.com/kicad/code/kicad/issues/7026
2021-01-09 16:53:32 +01:00
Jan Mrázek
93466fa165
Fix crash when adding 3D Models via Python
2020-12-28 20:03:54 +01:00
Jeff Young
ef25c78a04
Separate polygonization error from chaining error.
...
This way we can report anything that doesn't exactly chain while still
applying a fudge factor for our own stuff.
Fixes https://gitlab.com/kicad/code/kicad/issues/1795
2020-12-24 21:02:14 +00:00
Jeff Young
17800b926f
Honour couryard_clearance rules when checking for courtyard overlaps.
2020-12-23 17:34:21 +00:00
Jeff Young
5e9d9f5753
Special handling for presence of Ref or Value in groups.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/6677
2020-12-09 00:18:36 +00:00